In controller I have got this:
def output
if params[:find]
result
elsif params[:print_db]
print_db
end
end
And the test doesn't want to enter in params[:find] condition.
Test controller:
test "should get 5 5 1 for view with 5 5 1 3 3" do
get :output, {str: "5 5 1 3 3 5"}, :params => 'find'
assert_equal assigns[:result], "5, 5, 1"
end
Please, help me!
findparam, e.g.,find: trueor something. Put a pry/etc in your controller and actually look at your params.