Nuke all SiteSetting.stubs from our codebase.

This commit is contained in:
Guo Xiang Tan
2017-07-07 15:09:14 +09:00
parent e7e16de3e0
commit 13f3de4bf6
59 changed files with 257 additions and 262 deletions

View File

@ -889,7 +889,7 @@ describe PostsController do
context "when edit history is not visible to the public" do
before { SiteSetting.stubs(:edit_history_visible_to_public).returns(false) }
before { SiteSetting.edit_history_visible_to_public = false }
it "ensures anonymous cannot see the revisions" do
xhr :get, :revisions, post_id: post_revision.post_id, revision: post_revision.number
@ -926,7 +926,7 @@ describe PostsController do
context "when edit history is visible to everyone" do
before { SiteSetting.stubs(:edit_history_visible_to_public).returns(true) }
before { SiteSetting.edit_history_visible_to_public = true }
it "ensures anyone can see the revisions" do
xhr :get, :revisions, post_id: post_revision.post_id, revision: post_revision.number