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

Test Dashboard Controller params; resolves #154. #163

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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