X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/02eeefbe0ff7d5d60d6a7133942f5792d2aabb15..b78bb9f6313f3139ac83784df52bf39a5619d3e7:/test/models/changeset_comment_test.rb diff --git a/test/models/changeset_comment_test.rb b/test/models/changeset_comment_test.rb index 8215ce129..5ef0c1d93 100644 --- a/test/models/changeset_comment_test.rb +++ b/test/models/changeset_comment_test.rb @@ -2,7 +2,7 @@ require "test_helper" class ChangesetCommentTest < ActiveSupport::TestCase - fixtures :changesets + fixtures :changesets, :users # validations def test_does_not_accept_invalid_author @@ -33,8 +33,9 @@ class ChangesetCommentTest < ActiveSupport::TestCase end def test_comments_of_changeset_count - create_list(:changeset_comment, 3, :changeset_id => changesets(:normal_user_closed_change).id) - assert_equal 3, Changeset.find(changesets(:normal_user_closed_change).id).comments.count + changeset = create(:changeset) + create_list(:changeset_comment, 3, :changeset_id => changeset.id) + assert_equal 3, Changeset.find(changeset.id).comments.count end def test_body_valid