Skip to content

Commit

Permalink
fix(tests): Update tests to work with GitLab parser.
Browse files Browse the repository at this point in the history
  • Loading branch information
olls committed Feb 10, 2016
1 parent c4afd92 commit 65a5193
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/build-manager-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ test('build_manager.rerun', function (t) {
t.test('rerun successful build (valid payload)', function (st) {
var payload = JSON.stringify({ repository: { full_name: 'repo' }, ref: 'refs/heads/master' });
options.headers['x-hub-signature'] = github_sig(config.github_secret, payload);
options.headers['X-GitHub-Delivery'] = 1;

var build_manager = request(payload, function (res, data) {
st.equal(data.msg, 'Build queued', 'correct server response');
Expand Down Expand Up @@ -198,6 +199,7 @@ test('build_manager.data', function (t) {
});

options.headers['x-hub-signature'] = github_sig(config.github_secret, payload);
options.headers['X-GitHub-Delivery'] = 1;

var build_manager = request(payload, function (res, data) {
var build = build_manager.builds[data.id];
Expand All @@ -223,6 +225,7 @@ test('build_manager.data', function (t) {
});

options.headers['x-hub-signature'] = github_sig(config.github_secret, payload);
options.headers['X-GitHub-Delivery'] = 1;

var build_manager = request(payload, function (res, data) {
var build = build_manager.builds[data.id];
Expand Down
2 changes: 2 additions & 0 deletions test/github.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ var test = require('tape'),


var options = common.options;
options.headers['X-GitHub-Delivery'] = 1;

var config = common.config;
var request = common.request;
var gen_sig = common.github_sig;
Expand Down

0 comments on commit 65a5193

Please sign in to comment.