From 64e2bca8326bd46a2ad80b6a7a430dea0f81ff6b Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Thu, 14 Mar 2024 11:34:28 +0100 Subject: Added rubocop-minitest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- test/controllers/exports_controller_test.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test/controllers/exports_controller_test.rb') diff --git a/test/controllers/exports_controller_test.rb b/test/controllers/exports_controller_test.rb index 42ed1a2..9e69df8 100644 --- a/test/controllers/exports_controller_test.rb +++ b/test/controllers/exports_controller_test.rb @@ -8,17 +8,17 @@ class ExportsControllerTest < ActionDispatch::IntegrationTest get search_exports_url(0, format: 'csv') body = @response.body.split("\n") - assert body.size == 2 - assert body.first.split(',')[0] == things(:thing2).target - assert body.last.split(',')[0] == things(:thing1).target + targets = body.map { |b| b.split(',').first } - assert @response.media_type == 'text/csv' + assert_equal targets, [things(:thing2).target, things(:thing1).target] + + assert_equal 'text/csv', @response.media_type end test 'uoc: works' do get search_exports_url(0, format: 'uoc') - assert @response.body == file_fixture('all.uoc.tex').read - assert @response.media_type == 'application/x-tex' + assert_equal @response.body, file_fixture('all.uoc.tex').read + assert_equal 'application/x-tex', @response.media_type end end -- cgit v1.2.3