Skip to content

Commit

Permalink
add regression tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenplusplus committed Mar 10, 2015
1 parent ea9d89c commit bd7b3e2
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions regression/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,32 @@ describe('storage', function() {
});
});
});

it('should be made public', function(done) {
bucket.makePublic(function(err) {
assert.ifError(err);
bucket.acl.get({ entity: 'allUsers' }, function(err, aclObject) {
assert.ifError(err);
assert.deepEqual(aclObject, { entity: 'allUsers', role: 'READER' });
bucket.acl.delete({ entity: 'allUsers' }, done);
});
});
});

it('should be made private', function(done) {
bucket.makePublic(function(err) {
assert.ifError(err);
bucket.makePrivate(function(err) {
assert.ifError(err);
bucket.acl.get({ entity: 'allUsers' }, function(err, aclObject) {
assert.equal(err.code, 404);
assert.equal(err.message, 'Not Found');
assert.equal(aclObject, null);
done();
});
});
});
});
});

describe('files', function() {
Expand Down

0 comments on commit bd7b3e2

Please sign in to comment.