Compare items of the same type

Co-Authored-By: Dan Rice <dnrce@users.noreply.github.com>
This commit is contained in:
Matt Rogers 2018-11-03 15:19:57 -05:00
parent 908f021aa5
commit 6e48ce6594
No known key found for this signature in database
GPG key ID: 605D017C07EB4316

View file

@ -6,13 +6,13 @@ class TodoCreateParamsHelperTest < ActiveSupport::TestCase
def test_works_with_request_as_root_hash_entry
params = ActionController::Parameters.new({'request' => { 'todo' => { 'description' => 'foo'}}})
params_helper = Todos::TodoCreateParamsHelper.new(params, users(:admin_user))
assert_equal({'description' => 'foo'}, params_helper.attributes)
assert_equal({'description' => 'foo'}, params_helper.attributes.to_h)
end
def test_works_with_todo_as_root_hash_entry
params = ActionController::Parameters.new({ 'todo' => { 'description' => 'foo'}})
params_helper = Todos::TodoCreateParamsHelper.new(params, users(:admin_user))
assert_equal({'description' => 'foo'}, params_helper.attributes)
assert_equal({'description' => 'foo'}, params_helper.attributes.to_h)
end
def test_show_from_accessor