spec/routes/oauth_spec.rb in osso-0.0.3.16 vs spec/routes/oauth_spec.rb in osso-0.0.3.17
- old
+ new
@@ -6,21 +6,24 @@
let(:client) { create(:oauth_client) }
describe 'get /oauth/authorize' do
describe 'with a valid client ID and redirect URI' do
describe 'for a domain that does not belong to an enterprise' do
- it '404s' do
+ # TODO: better error handling and test
+ it 'renders an error page' do
+ described_class.set(:views, spec_views)
+
create(:enterprise_with_okta, domain: 'foo.com')
get(
'/oauth/authorize',
domain: 'bar.org',
client_id: client.identifier,
response_type: 'code',
redirect_uri: client.redirect_uri_values.sample,
)
- expect(last_response.status).to eq(404)
+ expect(last_response.status).to eq(200)
end
end
describe 'for an enterprise domain with one SAML provider' do
it 'redirects to /auth/saml/:provider_id' do