Skip to content

Instantly share code, notes, and snippets.

@hchood
Created April 15, 2016 17:28
Show Gist options
  • Save hchood/b89af48afad694e2dff49b1fa7c517a0 to your computer and use it in GitHub Desktop.
Save hchood/b89af48afad694e2dff49b1fa7c517a0 to your computer and use it in GitHub Desktop.
describe 'WidgetsController endpoints' do
describe 'GET /widgets' do
context 'with authenticated user' do
# ...
end
context 'without authenticated user' do
it 'returns a 401 - Unauthorized response' do
get(widgets_url, {}, accept_headers)
expect(response).to have_http_status :unauthorized
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment