houndci fixes
This commit is contained in:
parent
0beed70d7f
commit
44a95d9ced
2 changed files with 50 additions and 46 deletions
|
|
@ -3,7 +3,8 @@ 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] =
|
||||||
|
OmniAuth::AuthHash.new(
|
||||||
provider: 'google',
|
provider: 'google',
|
||||||
uid: 'google-test-uid-1',
|
uid: 'google-test-uid-1',
|
||||||
info: {
|
info: {
|
||||||
|
|
@ -13,11 +14,12 @@ module OmniauthMacros
|
||||||
token: 'mock_token',
|
token: 'mock_token',
|
||||||
secret: 'mock_secret'
|
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] =
|
||||||
|
OmniAuth::AuthHash.new(
|
||||||
provider: 'google',
|
provider: 'google',
|
||||||
uid: 'facebook-test-uid-1',
|
uid: 'facebook-test-uid-1',
|
||||||
info: {
|
info: {
|
||||||
|
|
@ -27,13 +29,14 @@ module OmniauthMacros
|
||||||
token: 'mock_token',
|
token: 'mock_token',
|
||||||
secret: 'mock_secret'
|
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] =
|
||||||
|
OmniAuth::AuthHash.new(
|
||||||
provider: 'google',
|
provider: 'google',
|
||||||
uid: 'google-test-uid-participant-1',
|
uid: 'google-test-uid-participant-1',
|
||||||
info: {
|
info: {
|
||||||
|
|
@ -43,13 +46,14 @@ module OmniauthMacros
|
||||||
token: 'mock_token',
|
token: 'mock_token',
|
||||||
secret: 'mock_secret'
|
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] =
|
||||||
|
OmniAuth::AuthHash.new(
|
||||||
provider: 'google',
|
provider: 'google',
|
||||||
uid: 'google-test-uid-admin-1',
|
uid: 'google-test-uid-admin-1',
|
||||||
info: {
|
info: {
|
||||||
|
|
@ -59,6 +63,6 @@ module OmniauthMacros
|
||||||
token: 'mock_token',
|
token: 'mock_token',
|
||||||
secret: 'mock_secret'
|
secret: 'mock_secret'
|
||||||
}
|
}
|
||||||
})
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue