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'
|
get 'conference/show'
|
||||||
|
|
||||||
devise_for :users, controllers: { registrations: :registrations,
|
devise_for :users, controllers: { registrations: :registrations,
|
||||||
omniauth_callbacks: 'users/omniauth_callbacks' },
|
omniauth_callbacks: 'users/omniauth_callbacks' },
|
||||||
path: 'accounts'
|
path: 'accounts'
|
||||||
|
|
||||||
namespace :admin do
|
namespace :admin do
|
||||||
resources :users
|
resources :users
|
||||||
|
|
|
||||||
|
|
@ -3,62 +3,66 @@ module OmniauthMacros
|
||||||
# authentication hashes to return during integration testing.
|
# authentication hashes to return during integration testing.
|
||||||
|
|
||||||
def mock_auth_new_user
|
def mock_auth_new_user
|
||||||
OmniAuth.config.mock_auth[:google] = OmniAuth::AuthHash.new({
|
OmniAuth.config.mock_auth[:google] =
|
||||||
provider: 'google',
|
OmniAuth::AuthHash.new(
|
||||||
uid: 'google-test-uid-1',
|
provider: 'google',
|
||||||
info: {
|
uid: 'google-test-uid-1',
|
||||||
email: 'test-1@gmail.com'
|
info: {
|
||||||
},
|
email: 'test-1@gmail.com'
|
||||||
credentials: {
|
},
|
||||||
token: 'mock_token',
|
credentials: {
|
||||||
secret: 'mock_secret'
|
token: 'mock_token',
|
||||||
}
|
secret: 'mock_secret'
|
||||||
})
|
}
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
def mock_auth_new_user_fb
|
def mock_auth_new_user_fb
|
||||||
OmniAuth.config.mock_auth[:facebook] = OmniAuth::AuthHash.new({
|
OmniAuth.config.mock_auth[:facebook] =
|
||||||
provider: 'google',
|
OmniAuth::AuthHash.new(
|
||||||
uid: 'facebook-test-uid-1',
|
provider: 'google',
|
||||||
info: {
|
uid: 'facebook-test-uid-1',
|
||||||
email: 'test-1@gmail.com'
|
info: {
|
||||||
},
|
email: 'test-1@gmail.com'
|
||||||
credentials: {
|
},
|
||||||
token: 'mock_token',
|
credentials: {
|
||||||
secret: 'mock_secret'
|
token: 'mock_token',
|
||||||
}
|
secret: 'mock_secret'
|
||||||
})
|
}
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
def mock_auth_existing_user_participant
|
def mock_auth_existing_user_participant
|
||||||
# The mock_auth configuration allows you to set per-provider (or default)
|
# The mock_auth configuration allows you to set per-provider (or default)
|
||||||
# authentication hashes to return during integration testing.
|
# authentication hashes to return during integration testing.
|
||||||
OmniAuth.config.mock_auth[:google] = OmniAuth::AuthHash.new({
|
OmniAuth.config.mock_auth[:google] =
|
||||||
provider: 'google',
|
OmniAuth::AuthHash.new(
|
||||||
uid: 'google-test-uid-participant-1',
|
provider: 'google',
|
||||||
info: {
|
uid: 'google-test-uid-participant-1',
|
||||||
email: 'test-participant-1@google.com'
|
info: {
|
||||||
},
|
email: 'test-participant-1@google.com'
|
||||||
credentials: {
|
},
|
||||||
token: 'mock_token',
|
credentials: {
|
||||||
secret: 'mock_secret'
|
token: 'mock_token',
|
||||||
}
|
secret: 'mock_secret'
|
||||||
})
|
}
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
def mock_auth_existing_user_admin
|
def mock_auth_existing_user_admin
|
||||||
# The mock_auth configuration allows you to set per-provider (or default)
|
# The mock_auth configuration allows you to set per-provider (or default)
|
||||||
# authentication hashes to return during integration testing.
|
# authentication hashes to return during integration testing.
|
||||||
OmniAuth.config.mock_auth[:google] = OmniAuth::AuthHash.new({
|
OmniAuth.config.mock_auth[:google] =
|
||||||
provider: 'google',
|
OmniAuth::AuthHash.new(
|
||||||
uid: 'google-test-uid-admin-1',
|
provider: 'google',
|
||||||
info: {
|
uid: 'google-test-uid-admin-1',
|
||||||
email: 'test-admin-1@google.com'
|
info: {
|
||||||
},
|
email: 'test-admin-1@google.com'
|
||||||
credentials: {
|
},
|
||||||
token: 'mock_token',
|
credentials: {
|
||||||
secret: 'mock_secret'
|
token: 'mock_token',
|
||||||
}
|
secret: 'mock_secret'
|
||||||
})
|
}
|
||||||
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue