Skip to content

Commit

Permalink
Added a test hook for whether strategy is stateless, and added a rele…
Browse files Browse the repository at this point in the history
…vant test. Updated package to include @mnzt and @welps into the contributors section, along with adding flags for AVA to be verbose and to failFast, as suggested in liamcurry#23.
  • Loading branch information
MNZT committed Jan 22, 2016
1 parent bfa2467 commit 7e45692
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 21 deletions.
3 changes: 2 additions & 1 deletion lib/passport-steam/strategy.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ function Strategy(options, validate) {
OpenIDStrategy.call(this, options, validate);
}

this.name = 'steam';
this._name = 'steam';
this._stateless = options.stateless;
}

/**
Expand Down
33 changes: 16 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,18 @@
"email": "liam@curry.name",
"url": "http://www.liamcurry.com/"
},
"contributors": [
{
"name": "Toby Archer",
"email": "toby@nerdping.com",
"url": "http://github.com/mnzt"
},
{
"name": "Welps",
"url": "https://github.com/welps"
}
],
"contributors": [{
"name": "Toby Archer",
"email": "toby@nerdping.com",
"url": "http://github.com/mnzt"
}, {
"name": "Welps",
"url": "https://github.com/welps"
}],
"ava": {
"failFast": true,
"verbose": true
},
"repository": {
"type": "git",
"url": "git://github.com/liamcurry/passport-steam.git"
Expand All @@ -40,12 +41,10 @@
"engines": {
"node": ">= 0.4.0"
},
"licenses": [
{
"type": "MIT",
"url": "http://www.opensource.org/licenses/MIT"
}
],
"licenses": [{
"type": "MIT",
"url": "http://www.opensource.org/licenses/MIT"
}],
"keywords": [
"passport",
"steam",
Expand Down
10 changes: 7 additions & 3 deletions test/strategy.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@ function getStrategy () {
);
}

test('Strategy >> _providerURL', t => {
test("Whether the providerURL is steam's", t => {
t.same(getStrategy()._providerURL, 'http://steamcommunity.com/openid')
});

test('Strategy >> name', t => {
t.same(getStrategy().name, 'steam')
test("Whether the strategy name is 'steam'", t => {
t.same(getStrategy()._name, 'steam')
})

test("Whether OpenID is statless", t => {
t.same(getStrategy()._stateless, true)
})

0 comments on commit 7e45692

Please sign in to comment.