Skip to content

Commit 5f4c1a2

Browse files
committed
Adapt test for adding existing relationships
1 parent 24c7249 commit 5f4c1a2

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

test/controllers/controller_test.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1508,8 +1508,9 @@ def test_create_relationship_to_many_join_table_record_exists
15081508

15091509
post :create_relationship, params: {post_id: 3, relationship: 'tags', data: [{type: 'tags', id: 502}, {type: 'tags', id: 505}]}
15101510

1511-
assert_response :bad_request
1512-
assert_match /The relation to 502 already exists./, response.body
1511+
assert_response :no_content
1512+
post_object.reload
1513+
assert_equal [502,503,505], post_object.tag_ids
15131514
end
15141515

15151516
def test_update_relationship_to_many_missing_tags

0 commit comments

Comments
 (0)