Skip to content
This repository has been archived by the owner on Dec 28, 2023. It is now read-only.

Commit

Permalink
adding specs for when user is not logged in
Browse files Browse the repository at this point in the history
  • Loading branch information
nehamand committed Nov 8, 2023
1 parent 445fbdd commit 791a4b3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions spec/requests/new_admin/questionnaires_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,16 @@
expect(response).to redirect_to(root_path)
end
end

context 'when user is not logged in' do
let(:questionnaire) { create(:questionnaire) }

it 'redirects to sign in page' do
get new_admin_show_questionnaire_url(questionnaire.id)

expect(response).to redirect_to(root_path)
end
end
end

describe 'POST #create' do
Expand Down

0 comments on commit 791a4b3

Please sign in to comment.