Skip to content

Commit

Permalink
fix(test): use github user from env validable
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon committed Jun 12, 2016
1 parent 6a80929 commit c787ea4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ var AUTH = {
type: 'oauth',
token: process.env.TEST_CONVENTIONAL_GITHUB_RELEASER_TOKEN
};
var GITHUB_USER = process.env.TEST_CONVENTIONAL_GITHUB_USER || 'stevemaotest';

var github = new Github({
version: '3.0.0'
Expand All @@ -24,7 +25,7 @@ describe('conventional-github-releaser', function() {
fs.writeFileSync('test1', '');
shell.exec('git add --all && git commit -m"First commit"');

githubRemoveAllReleases(AUTH, 'stevemaotest', 'conventional-github-releaser-test', function() {
githubRemoveAllReleases(AUTH, GITHUB_USER, 'conventional-github-releaser-test', function() {
done();
});
});
Expand Down Expand Up @@ -73,7 +74,7 @@ describe('conventional-github-releaser', function() {
expect(responses[0].state).to.equal('fulfilled');
github.releases.getRelease({
// jscs:disable
owner: 'stevemaotest',
owner: GITHUB_USER,
repo: 'conventional-github-releaser-test',
id: responses[0].value.id
// jscs:enable
Expand Down Expand Up @@ -110,7 +111,7 @@ describe('conventional-github-releaser', function() {
expect(responses[0].state).to.equal('fulfilled');
github.releases.getRelease({
// jscs:disable
owner: 'stevemaotest',
owner: GITHUB_USER,
repo: 'conventional-github-releaser-test',
id: responses[0].value.id
// jscs:enable
Expand All @@ -135,7 +136,7 @@ describe('conventional-github-releaser', function() {
expect(responses.length).to.equal(1);
github.releases.getRelease({
// jscs:disable
owner: 'stevemaotest',
owner: GITHUB_USER,
repo: 'conventional-github-releaser-test',
id: responses[0].value.id
// jscs:enable
Expand Down

0 comments on commit c787ea4

Please sign in to comment.