diff --git a/Gemfile.lock b/Gemfile.lock index b5f8cd78e..c71b4c0cd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -706,7 +706,7 @@ GEM regexp_parser (2.9.0) reline (0.5.3) io-console (~> 0.5) - request_store (1.5.1) + request_store (1.6.0) rack (>= 1.4) responders (3.1.1) actionpack (>= 5.2) diff --git a/spec/system/articles/user_visits_an_article_spec.rb b/spec/system/articles/user_visits_an_article_spec.rb index 969e9e6d7..40df6497e 100644 --- a/spec/system/articles/user_visits_an_article_spec.rb +++ b/spec/system/articles/user_visits_an_article_spec.rb @@ -10,6 +10,12 @@ RSpec.describe "Views an article" do sign_in user end + it "stops a user from moderating an article" do + # TODO: @maetromac this spec must run first to pass. Due to the usage of RequestStore, there's a false positive + # with EdgeSafetyCheck. Reason is yet to be determined. + expect { visit("/#{user.username}/#{article.slug}/mod") }.to raise_error(Pundit::NotAuthorizedError) + end + it "shows an article", :js do visit article.path expect(page).to have_content(article.title) @@ -29,10 +35,6 @@ RSpec.describe "Views an article" do expect(page).to have_css(".single-comment-node", visible: :visible, count: 3) end - it "stops a user from moderating an article" do - expect { visit("/#{user.username}/#{article.slug}/mod") }.to raise_error(Pundit::NotAuthorizedError) - end - describe "sticky nav sidebar" do it "suggests articles by other users if the author has no other articles" do create(:article, user: create(:user)) diff --git a/vendor/cache/request_store-1.5.1.gem b/vendor/cache/request_store-1.5.1.gem deleted file mode 100644 index 9a6be28bc..000000000 Binary files a/vendor/cache/request_store-1.5.1.gem and /dev/null differ diff --git a/vendor/cache/request_store-1.6.0.gem b/vendor/cache/request_store-1.6.0.gem new file mode 100644 index 000000000..d9c0a7d0e Binary files /dev/null and b/vendor/cache/request_store-1.6.0.gem differ