Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

Commit

Permalink
Test Dashboard Controller params; resolves #154.
Browse files Browse the repository at this point in the history
  • Loading branch information
ruebot committed Aug 21, 2018
1 parent fd9aabf commit a184b4d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/controllers/dashboards_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,16 @@ class DashboardsControllerTest < ActionDispatch::IntegrationTest
end

test 'get dashboards index' do
params = { test: 'object' }
params = { dashboard: {
job_id: '1abas', user_id: '298486374', collection_id: '1234',
queue: 'download', start_time: '2018-08-01 08:48:01',
end_time: '2018-08-12 06:18:01'
} }
auth_headers = { "Authorization" => "Basic #{Base64.encode64('test:test')}" }
get dashboards_path, params: params, as: :html
assert_response 401
get dashboards_path, params: params, as: :html, headers: auth_headers
assert_response :success
assert_select 'td', 'Sample Collection'
end
end

0 comments on commit a184b4d

Please sign in to comment.