forked from MLH/mlh-no-light
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added MyMLH login to play !Light (MLH#12)
* Require users to login with MyMLH before using !Light * Updated README
- Loading branch information
1 parent
486bf4a
commit 2c2525c
Showing
10 changed files
with
175 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,10 +5,7 @@ | |
# DS_Store | ||
.DS_Store | ||
|
||
# Coveralls | ||
.coveralls.yml | ||
|
||
# Testing | ||
vendor/code_statistics.rb | ||
.env | ||
coverage/ | ||
coverage/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
web: rackup config.ru |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
# encoding: UTF-8 | ||
|
||
require 'bundler' | ||
require 'coveralls' | ||
require 'pry' | ||
|
||
Bundler.setup | ||
Bundler.require | ||
|
||
Coveralls.wear! | ||
|
||
ENV['RACK_ENV'] = 'test' | ||
set :environment, :test | ||
|
||
|
@@ -36,6 +33,24 @@ class MiniTest::Spec | |
end | ||
|
||
after(:each) do | ||
visit '/logout' | ||
DatabaseCleaner[:mongo_mapper].clean | ||
end | ||
end | ||
|
||
OmniAuth.config.test_mode = true | ||
|
||
def mock_with_valid_mlh_credentials! | ||
OmniAuth.config.mock_auth[:mlh] = OmniAuth::AuthHash.new({ | ||
provider: :mlh, | ||
uid: "1", | ||
info: OmniAuth::AuthHash::InfoHash.new({ | ||
email: '[email protected]', | ||
created_at: Time.now, | ||
updated_at: Time.now, | ||
first_name: 'Grace', | ||
last_name: 'Hopper', | ||
scopes: ['default'] | ||
}) | ||
}) | ||
end |
Oops, something went wrong.