diff options
| author | AppleDash <[email protected]> | 2022-04-02 11:55:10 -0400 |
|---|---|---|
| committer | AppleDash <[email protected]> | 2022-04-02 11:55:10 -0400 |
| commit | 3366eeb6c5b6f86aabd64fc05db98e6a16ec44bf (patch) | |
| tree | 81af0e872c229734539cbb980f1586b6251c6a6f /test/controllers/admin/batch | |
| parent | b211875ef3500e140c495464d81dbd58d567c3d5 (diff) | |
Make a lot of the old tests actually run
Diffstat (limited to 'test/controllers/admin/batch')
| -rw-r--r-- | test/controllers/admin/batch/tags_controller_test.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/controllers/admin/batch/tags_controller_test.rb b/test/controllers/admin/batch/tags_controller_test.rb index e8a5d61..423a172 100644 --- a/test/controllers/admin/batch/tags_controller_test.rb +++ b/test/controllers/admin/batch/tags_controller_test.rb @@ -14,7 +14,7 @@ class Admin::Batch::TagsControllerTest < ActionController::TestCase end test 'should batch add tags' do - @images = create_list(:image_skips_validation, 4) + @images = create_list(:post_skips_validation, 4) assert_enqueued_with(job: BulkIndexUpdateJob, args: ['Post', @images.map(&:id)]) do put :update, params: { tags: @tags.map(&:name).join(','), image_ids: @images.map(&:id) } @@ -25,21 +25,21 @@ class Admin::Batch::TagsControllerTest < ActionController::TestCase @images.map(&:reload).each do |image| @tags.each do |tag| assert_includes image.tags.to_a, tag - assert TagChange.exists? image: image, tag: tag, user: @user, added: true + assert TagChange.exists? post: image, tag: tag, user: @user, added: true end end end test 'should not create tag changes for tags that are already present' do - @image = create(:image_skips_validation) + @image = create(:post_skips_validation) @image.add_tags [@tags.first] @image.save put :update, params: { tags: @tags.map(&:name).join(','), image_ids: [@image.id] } assert_response :success - assert_not TagChange.exists? image: @image, tag: @tags.shift - @tags.each { |tag| assert TagChange.exists? image: @image, tag: tag } + assert_not TagChange.exists? post: @image, tag: @tags.shift + @tags.each { |tag| assert TagChange.exists? post: @image, tag: tag } end def json_response |
