Skip to content

Commit

Permalink
🚨 improve error handling in test env
Browse files Browse the repository at this point in the history
no issue
[ci skip]
  • Loading branch information
kirrg001 authored and ErisDS committed Sep 20, 2016
1 parent b3bafa4 commit bdad235
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/test/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ fixtures = {

overrideOwnerUser: function overrideOwnerUser(slug) {
var user;

user = DataGenerator.forKnex.createUser(DataGenerator.Content.users[0]);

if (slug) {
user.slug = slug;
}
Expand Down Expand Up @@ -590,6 +590,10 @@ togglePermalinks = function togglePermalinks(request, toggle) {
return reject(err);
}

if (res.statusCode !== 200) {
return reject(res.body);
}

resolve(res.body);
});
});
Expand Down

0 comments on commit bdad235

Please sign in to comment.