spec/routes/auth_spec.rb in osso-0.0.3.5 vs spec/routes/auth_spec.rb in osso-0.0.3.6
- old
+ new
@@ -4,11 +4,11 @@
describe Osso::Auth do
describe 'post /auth/saml/:uuid/callback' do
describe 'for an Okta SAML provider' do
let(:enterprise) { create(:enterprise_with_okta) }
- let(:okta_provider) { enterprise.saml_providers.first }
+ let(:okta_provider) { enterprise.identity_providers.first }
describe "on the user's first authentication" do
it 'creates a user' do
mock_saml_omniauth
@@ -16,11 +16,11 @@
post(
"/auth/saml/#{okta_provider.id}/callback",
nil,
{
'omniauth.auth' => OmniAuth.config.mock_auth[:saml],
- 'saml_provider' => okta_provider,
+ 'identity_provider' => okta_provider,
},
)
end.to change { Osso::Models::User.count }.by(1)
end
@@ -31,21 +31,21 @@
post(
"/auth/saml/#{okta_provider.id}/callback",
nil,
{
'omniauth.auth' => OmniAuth.config.mock_auth[:saml],
- 'saml_provider' => okta_provider,
+ 'identity_provider' => okta_provider,
},
)
end.to change { Osso::Models::AuthorizationCode.count }.by(1)
end
end
describe 'on subsequent authentications' do
let!(:enterprise) { create(:enterprise_with_okta) }
- let!(:okta_provider) { enterprise.saml_providers.first }
- let(:user) { create(:user, saml_provider_id: okta_provider.id) }
+ let!(:okta_provider) { enterprise.identity_providers.first }
+ let(:user) { create(:user, identity_provider_id: okta_provider.id) }
before do
mock_saml_omniauth(email: user.email, id: user.idp_id)
end
@@ -54,11 +54,11 @@
post(
"/auth/saml/#{okta_provider.id}/callback",
nil,
{
'omniauth.auth' => OmniAuth.config.mock_auth[:saml],
- 'saml_provider' => okta_provider,
+ 'identity_provider' => okta_provider,
},
)
end.to_not(change { Osso::Models::User.count })
end
end
@@ -76,21 +76,21 @@
post(
"/auth/saml/#{azure_provider.id}/callback",
nil,
{
'omniauth.auth' => OmniAuth.config.mock_auth[:saml],
- 'saml_provider' => azure_provider,
+ 'identity_provider' => azure_provider,
},
)
end.to change { Osso::Models::User.count }.by(1)
end
end
describe 'on subsequent authentications' do
let!(:enterprise) { create(:enterprise_with_azure) }
let!(:azure_provider) { enterprise.provider }
- let(:user) { create(:user, saml_provider_id: azure_provider.id) }
+ let(:user) { create(:user, identity_provider_id: azure_provider.id) }
before do
mock_saml_omniauth(email: user.email, id: user.idp_id)
end
@@ -99,10 +99,10 @@
post(
"/auth/saml/#{azure_provider.id}/callback",
nil,
{
'omniauth.auth' => OmniAuth.config.mock_auth[:saml],
- 'saml_provider' => azure_provider,
+ 'identity_provider' => azure_provider,
},
)
end.to_not(change { Osso::Models::User.count })
end
end