Upgrade to Rails 6.0 and apply new framework defaults
This commit is contained in:
@ -54,7 +54,7 @@ describe SubmissionsController do
|
||||
expect_status(200)
|
||||
|
||||
it 'sets the correct filename' do
|
||||
expect(response.headers['Content-Disposition']).to eq("attachment; filename=\"#{file.name_with_extension}\"")
|
||||
expect(response.headers['Content-Disposition']).to include("attachment; filename=\"#{file.name_with_extension}\"")
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -72,7 +72,7 @@ describe SubmissionsController do
|
||||
expect_status(200)
|
||||
|
||||
it 'sets the correct filename' do
|
||||
expect(response.headers['Content-Disposition']).to eq("attachment; filename=\"#{file.name_with_extension}\"")
|
||||
expect(response.headers['Content-Disposition']).to include("attachment; filename=\"#{file.name_with_extension}\"")
|
||||
end
|
||||
end
|
||||
|
||||
@ -85,7 +85,7 @@ describe SubmissionsController do
|
||||
expect_status(200)
|
||||
|
||||
it 'sets the correct filename' do
|
||||
expect(response.headers['Content-Disposition']).to eq("attachment; filename=\"#{file.name_with_extension}\"")
|
||||
expect(response.headers['Content-Disposition']).to include("attachment; filename=\"#{file.name_with_extension}\"")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -7,12 +7,18 @@ describe 'seeds' do
|
||||
|
||||
before do
|
||||
CodeOcean::Application.load_tasks
|
||||
|
||||
# We want to execute the seeds for the dev environment against the test database
|
||||
allow(Rails).to receive(:env) { 'development'.inquiry }
|
||||
allow(ActiveRecord::Base).to receive(:establish_connection).and_call_original
|
||||
allow(ActiveRecord::Base).to receive(:establish_connection).with(:development) {
|
||||
ActiveRecord::Base.establish_connection(:test)
|
||||
}
|
||||
end
|
||||
|
||||
describe 'execute db:seed' do
|
||||
it 'collects the test results' do
|
||||
expect { seed }.not_to raise_error(StandardError)
|
||||
expect { seed }.not_to raise_error
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -78,7 +78,8 @@ describe FileTree do
|
||||
let(:files) { FactoryBot.build_list(:file, 10, context: nil, path: 'foo/bar/baz') }
|
||||
|
||||
it 'creates a root node' do
|
||||
expect_any_instance_of(Tree::TreeNode).to receive(:initialize).with(file_tree.send(:root_label))
|
||||
# Instead of checking #initialize on the parent, we validate #set_as_root!
|
||||
expect(file_tree).to receive(:set_as_root!).and_call_original
|
||||
file_tree.send(:initialize)
|
||||
end
|
||||
|
||||
|
@ -17,7 +17,7 @@ end
|
||||
|
||||
def expect_content_type(content_type)
|
||||
it "responds with content type '#{content_type}'" do
|
||||
expect([response.content_type, response.headers['Content-Type']]).to include(content_type)
|
||||
expect([response.media_type, response.headers['Content-Type']]).to include(content_type)
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user