Skip to content

Commit

Permalink
Changed test names and removed a test.
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyGramlich committed May 2, 2019
1 parent 2072dc8 commit 4d3f075
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions test/user.spec.js
Expand Up @@ -87,7 +87,7 @@ describe('User', function() {
return user.unfollow(userToFollow);
})

it('should attempt to follow yourself', function(done) {
it('should not list yourself as one of your followers', function(done) {
user.follow(userToFollow, assertSuccessful(done, function(err, resp) {
user._request('GET', `/user/following`, null, assertSuccessful(done, function(err, following) {
expect((following.some(user => user['login'] === userToFollow))).to.be.false();
Expand All @@ -104,24 +104,7 @@ describe('User', function() {
return user.follow(userToUnfollow);
})

it('should attempt to unfollow a user', function(done) {
user.unfollow(userToUnfollow, assertSuccessful(done, function(err, resp) {
user._request('GET', `/user/following`, null, assertSuccessful(done, function(err, following) {
expect((following.some(user => user['login'] === userToUnfollow))).to.be.false();
done();
}));
}));
});
})

describe('unfollowing yourself', function(done) {
const userToUnfollow = testUser.USERNAME;

before(function() {
return user.follow(userToUnfollow);
})

it('should attempt to unfollow yourself', function(done) {
it('should unfollow a user', function(done) {
user.unfollow(userToUnfollow, assertSuccessful(done, function(err, resp) {
user._request('GET', `/user/following`, null, assertSuccessful(done, function(err, following) {
expect((following.some(user => user['login'] === userToUnfollow))).to.be.false();
Expand Down

0 comments on commit 4d3f075

Please sign in to comment.