Skip to content

Commit

Permalink
Removed errors related to passing parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Souravirus committed Jun 13, 2018
1 parent 19dc939 commit bc117ce
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions test/functional/features_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ def teardown

assert_difference 'Node.count', 0 do
get :create,
params: {
title: 'new-feature',
body: "A new feature to <a href=''>display</a>"
}
end

assert_equal 'Only admins may edit features.', flash[:warning]
Expand Down
2 changes: 2 additions & 0 deletions test/functional/notes_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -833,11 +833,13 @@ def test_get_rss_feed
title = 'My new post about balloon mapping'

post :create,
params: {
id: users(:bob).id,
title: title,
body: 'This is a fascinating post about a balloon mapping event.',
tags: 'balloon-mapping,event',
draft: "true"
}

assert_redirected_to('/login')
end
Expand Down
4 changes: 2 additions & 2 deletions test/functional/user_tags_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,13 @@ def setup
assert_not assigns['user_tags'].include?(0)
assert_not_nil :user_tags

get :index, {sort: "value"}
get :index, params: {sort: "value"}
assert_equal assigns['user_tags'].collect{ |a| [a[0], a[1]] }, assigns['user_tags'].sort_by{ |a| [a[0]]}

end

test 'user tags search' do
get :index, search: "skill:rails"
get :index, params: { search: "skill:rails" }

assert :success
assert assigns(:user_tags).length > 0
Expand Down
2 changes: 2 additions & 0 deletions test/functional/wiki_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,12 @@ def teardown
UserSession.find.destroy

post :create,
params: {
uid: users(:bob).id,
title: 'All about balloon mapping',
body: 'This is fascinating documentation about balloon mapping.',
tags: 'balloon-mapping,event'
}

assert_redirected_to('/login')
end
Expand Down

0 comments on commit bc117ce

Please sign in to comment.