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

@ -8,19 +8,19 @@ describe Onebox::Engine::FlashVideoOnebox do
context "when SiteSetting.enable_flash_video_onebox is true" do
before do
SiteSetting.stubs(:enable_flash_video_onebox).returns(true)
SiteSetting.enable_flash_video_onebox = true
end
it "generates a flash video" do
expect(@o.to_html).to match_html(
"<object width='100%' height='100%'><param name='http://player.56.com/v_OTMyNTk1MzE.swf' value='http://player.56.com/v_OTMyNTk1MzE.swf'><embed src='http://player.56.com/v_OTMyNTk1MzE.swf' width='100%' height='100%'></embed></object>"
"<object width='100%' height='100%'><param name='http://player.56.com/v_OTMyNTk1MzE.swf' value='http://player.56.com/v_OTMyNTk1MzE.swf'><embed src='http://player.56.com/v_OTMyNTk1MzE.swf' width='100%' height='100%'></embed></object>"
)
end
end
context "when SiteSetting.enable_flash_video_onebox is false" do
before do
SiteSetting.stubs(:enable_flash_video_onebox).returns(false)
SiteSetting.enable_flash_video_onebox = false
end
it "generates a link" do