mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:34:31 +08:00
Support Ruby 2.4.
This commit is contained in:
@ -75,12 +75,12 @@ describe UploadsController do
|
||||
end
|
||||
|
||||
it 'is successful with synchronous api' do
|
||||
SiteSetting.stubs(:authorized_extensions).returns("*")
|
||||
SiteSetting.authorized_extensions = "*"
|
||||
controller.stubs(:is_api?).returns(true)
|
||||
|
||||
Jobs.expects(:enqueue).with(:create_thumbnails, anything)
|
||||
|
||||
FakeWeb.register_uri(:get, "http://example.com/image.png", :body => File.read('spec/fixtures/images/logo.png'))
|
||||
stub_request(:get, "http://example.com/image.png").to_return(body: File.read('spec/fixtures/images/logo.png'))
|
||||
|
||||
xhr :post, :create, url: 'http://example.com/image.png', type: "avatar", synchronous: true
|
||||
|
||||
|
@ -24,7 +24,7 @@ describe UserAvatarsController do
|
||||
SiteSetting.s3_upload_bucket = "test"
|
||||
SiteSetting.s3_cdn_url = "http://cdn.com"
|
||||
|
||||
FakeWeb.register_uri(:get, "http://cdn.com/something/else", :body => 'image')
|
||||
stub_request(:get, "http://cdn.com/something/else").to_return(body: 'image')
|
||||
|
||||
GlobalSetting.expects(:cdn_url).returns("http://awesome.com/boom")
|
||||
|
||||
|
Reference in New Issue
Block a user