Skip to content

Commit

Permalink
[ci] Positional arguments are deprecated
Browse files Browse the repository at this point in the history
Using positional arguments in functional tests has been deprecated in
favor of keyword arguments, and will be removed in Rails 5.1.

The change in
spec/controllers/webui/download_on_demand_controller_spec.rb:32 seems to
be something that must be solve in shoulda-matchers gem. In the
meanwhile that solution works.
  • Loading branch information
Ana06 committed Jan 26, 2017
1 parent 66e450f commit d778ffe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Expand Up @@ -22,8 +22,8 @@
context 'as admin' do
before do
login(admin_user)
patch :update, configuration: { name: 'obs', title: 'OBS', description: 'something',
unlisted_projects_filter: '^home:fake_user:.*', unlisted_projects_filter_description: "fake_user's home" }
patch :update, params: { configuration: { name: 'obs', title: 'OBS', description: 'something',
unlisted_projects_filter: '^home:fake_user:.*', unlisted_projects_filter_description: "fake_user's home" } }
end

it { expect(response).to redirect_to(configuration_path) }
Expand Down
Expand Up @@ -30,7 +30,7 @@
it "uses strong parameters" do
login(admin_user)
should permit(:arch, :repotype, :url, :repository_id, :archfilter, :masterurl, :mastersslfingerprint, :pubkey).
for(:create, params: dod_parameters ).on(:download_repository)
for(:create, params: { params: dod_parameters } ).on(:download_repository)
end

describe "POST create" do
Expand Down
4 changes: 2 additions & 2 deletions src/api/spec/controllers/webui/package_controller_spec.rb
Expand Up @@ -720,15 +720,15 @@ def remove_file_post

describe 'GET #package_live_build_log' do
def do_request(params)
get :live_build_log, params
get :live_build_log, params: params
end

it_should_behave_like "build log"
end

describe "GET #update_build_log" do
def do_request(params)
xhr :get, :update_build_log, params
xhr :get, :update_build_log, params: params
end

it_should_behave_like "build log"
Expand Down

0 comments on commit d778ffe

Please sign in to comment.