mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
houndci fixes
This commit is contained in:
parent
0beed70d7f
commit
44a95d9ced
2 changed files with 50 additions and 46 deletions
|
|
@ -3,8 +3,8 @@ Osem::Application.routes.draw do
|
|||
get 'conference/show'
|
||||
|
||||
devise_for :users, controllers: { registrations: :registrations,
|
||||
omniauth_callbacks: 'users/omniauth_callbacks' },
|
||||
path: 'accounts'
|
||||
omniauth_callbacks: 'users/omniauth_callbacks' },
|
||||
path: 'accounts'
|
||||
|
||||
namespace :admin do
|
||||
resources :users
|
||||
|
|
|
|||
|
|
@ -3,62 +3,66 @@ module OmniauthMacros
|
|||
# authentication hashes to return during integration testing.
|
||||
|
||||
def mock_auth_new_user
|
||||
OmniAuth.config.mock_auth[:google] = OmniAuth::AuthHash.new({
|
||||
provider: 'google',
|
||||
uid: 'google-test-uid-1',
|
||||
info: {
|
||||
email: 'test-1@gmail.com'
|
||||
},
|
||||
credentials: {
|
||||
token: 'mock_token',
|
||||
secret: 'mock_secret'
|
||||
}
|
||||
})
|
||||
OmniAuth.config.mock_auth[:google] =
|
||||
OmniAuth::AuthHash.new(
|
||||
provider: 'google',
|
||||
uid: 'google-test-uid-1',
|
||||
info: {
|
||||
email: 'test-1@gmail.com'
|
||||
},
|
||||
credentials: {
|
||||
token: 'mock_token',
|
||||
secret: 'mock_secret'
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
def mock_auth_new_user_fb
|
||||
OmniAuth.config.mock_auth[:facebook] = OmniAuth::AuthHash.new({
|
||||
provider: 'google',
|
||||
uid: 'facebook-test-uid-1',
|
||||
info: {
|
||||
email: 'test-1@gmail.com'
|
||||
},
|
||||
credentials: {
|
||||
token: 'mock_token',
|
||||
secret: 'mock_secret'
|
||||
}
|
||||
})
|
||||
OmniAuth.config.mock_auth[:facebook] =
|
||||
OmniAuth::AuthHash.new(
|
||||
provider: 'google',
|
||||
uid: 'facebook-test-uid-1',
|
||||
info: {
|
||||
email: 'test-1@gmail.com'
|
||||
},
|
||||
credentials: {
|
||||
token: 'mock_token',
|
||||
secret: 'mock_secret'
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
def mock_auth_existing_user_participant
|
||||
# The mock_auth configuration allows you to set per-provider (or default)
|
||||
# authentication hashes to return during integration testing.
|
||||
OmniAuth.config.mock_auth[:google] = OmniAuth::AuthHash.new({
|
||||
provider: 'google',
|
||||
uid: 'google-test-uid-participant-1',
|
||||
info: {
|
||||
email: 'test-participant-1@google.com'
|
||||
},
|
||||
credentials: {
|
||||
token: 'mock_token',
|
||||
secret: 'mock_secret'
|
||||
}
|
||||
})
|
||||
OmniAuth.config.mock_auth[:google] =
|
||||
OmniAuth::AuthHash.new(
|
||||
provider: 'google',
|
||||
uid: 'google-test-uid-participant-1',
|
||||
info: {
|
||||
email: 'test-participant-1@google.com'
|
||||
},
|
||||
credentials: {
|
||||
token: 'mock_token',
|
||||
secret: 'mock_secret'
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
def mock_auth_existing_user_admin
|
||||
# The mock_auth configuration allows you to set per-provider (or default)
|
||||
# authentication hashes to return during integration testing.
|
||||
OmniAuth.config.mock_auth[:google] = OmniAuth::AuthHash.new({
|
||||
provider: 'google',
|
||||
uid: 'google-test-uid-admin-1',
|
||||
info: {
|
||||
email: 'test-admin-1@google.com'
|
||||
},
|
||||
credentials: {
|
||||
token: 'mock_token',
|
||||
secret: 'mock_secret'
|
||||
}
|
||||
})
|
||||
OmniAuth.config.mock_auth[:google] =
|
||||
OmniAuth::AuthHash.new(
|
||||
provider: 'google',
|
||||
uid: 'google-test-uid-admin-1',
|
||||
info: {
|
||||
email: 'test-admin-1@google.com'
|
||||
},
|
||||
credentials: {
|
||||
token: 'mock_token',
|
||||
secret: 'mock_secret'
|
||||
}
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue