diff options
| author | Miquel Sabaté Solà <msabate@suse.com> | 2024-03-14 11:34:28 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <msabate@suse.com> | 2024-03-14 14:09:11 +0100 |
| commit | 64e2bca8326bd46a2ad80b6a7a430dea0f81ff6b (patch) | |
| tree | bf4d1894c45471ee1d38b6292b87e356737f2fb6 /test/controllers/exports_controller_test.rb | |
| parent | 90feff2bfcbdb5586a459c2350a4172a4423668e (diff) | |
| download | operum-64e2bca8326bd46a2ad80b6a7a430dea0f81ff6b.tar.gz operum-64e2bca8326bd46a2ad80b6a7a430dea0f81ff6b.zip | |
Added rubocop-minitest
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
Diffstat (limited to 'test/controllers/exports_controller_test.rb')
| -rw-r--r-- | test/controllers/exports_controller_test.rb | 12 |
1 files changed, 6 insertions, 6 deletions
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 |
