This commit is contained in:
Zachary Carter 2013-03-07 11:20:57 -08:00
Родитель ca7d786830
Коммит a0cd7db37a
2 изменённых файлов: 0 добавлений и 26 удалений

Просмотреть файл

@ -6,8 +6,6 @@ var server = helpers.server;
var makeRequest = helpers.makeRequest.bind(server); var makeRequest = helpers.makeRequest.bind(server);
var TEST_AUDIENCE = config.get('audience'); var TEST_AUDIENCE = config.get('audience');
var TEST_EMAIL = 'foo@example.com';
var TEST_UNKNOWN_EMAIL = 'unknown@example.com';
var TEST_ASSERTION; var TEST_ASSERTION;
var TEST_UNKNOWN_ASSERTION; var TEST_UNKNOWN_ASSERTION;
@ -15,10 +13,8 @@ describe('get user', function() {
it('can get user email and assertion', function(done) { it('can get user email and assertion', function(done) {
helpers.getUser(TEST_AUDIENCE, function(err, user) { helpers.getUser(TEST_AUDIENCE, function(err, user) {
TEST_EMAIL = user.email;
TEST_ASSERTION = user.assertion; TEST_ASSERTION = user.assertion;
assert.ok(TEST_EMAIL);
assert.ok(TEST_ASSERTION); assert.ok(TEST_ASSERTION);
done(); done();
@ -28,10 +24,8 @@ describe('get user', function() {
it('can get another user email and assertion', function(done) { it('can get another user email and assertion', function(done) {
helpers.getUser(TEST_AUDIENCE, function(err, user) { helpers.getUser(TEST_AUDIENCE, function(err, user) {
TEST_UNKNOWN_EMAIL = user.email;
TEST_UNKNOWN_ASSERTION = user.assertion; TEST_UNKNOWN_ASSERTION = user.assertion;
assert.ok(TEST_UNKNOWN_EMAIL);
assert.ok(TEST_UNKNOWN_ASSERTION); assert.ok(TEST_UNKNOWN_ASSERTION);
done(); done();

Просмотреть файл

@ -5,31 +5,13 @@ var helpers = require('../helpers');
var server = helpers.server; var server = helpers.server;
var makeRequest = helpers.makeRequest.bind(server); var makeRequest = helpers.makeRequest.bind(server);
var TEST_AUDIENCE = config.get('audience');
var TEST_EMAIL = 'foo@example.com'; var TEST_EMAIL = 'foo@example.com';
var TEST_ASSERTION;
/*describe('get user', function() {*/
//it('can get user email and assertion', function(done) {
//helpers.getUser(TEST_AUDIENCE, function(err, user) {
//TEST_EMAIL = user.email;
//TEST_ASSERTION = user.assertion;
//assert.ok(TEST_EMAIL);
//assert.ok(TEST_ASSERTION);
//done();
//});
//});
/*});*/
describe('user', function() { describe('user', function() {
var kA, version, deviceId; var kA, version, deviceId;
it('should create a new account', function(done) { it('should create a new account', function(done) {
makeRequest('POST', '/user', { makeRequest('POST', '/user', {
//payload: { assertion: TEST_ASSERTION }
payload: { email: TEST_EMAIL } payload: { email: TEST_EMAIL }
}, function(res) { }, function(res) {
assert.equal(res.statusCode, 201); assert.equal(res.statusCode, 201);
@ -45,7 +27,6 @@ describe('user', function() {
it('should add a new device', function(done) { it('should add a new device', function(done) {
makeRequest('POST', '/device', { makeRequest('POST', '/device', {
//payload: { assertion: TEST_ASSERTION }
payload: { email: TEST_EMAIL } payload: { email: TEST_EMAIL }
}, function(res) { }, function(res) {
assert.equal(res.statusCode, 201); assert.equal(res.statusCode, 201);
@ -83,7 +64,6 @@ describe('user', function() {
it('should bump version', function(done) { it('should bump version', function(done) {
makeRequest('POST', '/user/bump/' + deviceId, { makeRequest('POST', '/user/bump/' + deviceId, {
//payload: { assertion: TEST_ASSERTION }
payload: { email: TEST_EMAIL } payload: { email: TEST_EMAIL }
}, function(res) { }, function(res) {
assert.equal(res.statusCode, 200); assert.equal(res.statusCode, 200);