Skip to content

Commit 83a6158

Browse files
committed
Fix a test.
1 parent 0446211 commit 83a6158

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

mocha.start.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ beforeEach(function () {
5555
adapter = new DSSqlAdapter({
5656
client: 'mysql',
5757
connection: {
58-
user: 'ubuntu',
59-
database: 'circle_test'
60-
//user: 'root',
61-
//database: 'test'
58+
//user: 'ubuntu',
59+
//database: 'circle_test'
60+
user: 'root',
61+
database: 'test'
6262
}
6363
});
6464
DSUtils = JSData.DSUtils;
@@ -134,6 +134,8 @@ afterEach(function (done) {
134134
return adapter.destroyAll(Post);
135135
}).then(function () {
136136
return adapter.destroyAll(User);
137+
}).then(function () {
138+
return adapter.destroyAll(Profile);
137139
}).then(function () {
138140
done();
139141
}, done);

test/findAll.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ describe.only('DSSqlAdapter#findAll', function () {
121121
})
122122
.then(function (comments) {
123123
comments.sort(function (a) {
124-
return a.user.profile;
124+
return !a.user.profile;
125125
});
126126
assert.isDefined(comments[0].post);
127127
assert.isDefined(comments[0].post.user);
@@ -165,7 +165,7 @@ describe.only('DSSqlAdapter#findAll', function () {
165165
})
166166
.then(function (posts) {
167167
posts.sort(function (a) {
168-
return a.comments[0].user.profile;
168+
return !a.comments[0].user.profile;
169169
});
170170
assert.isDefined(posts[0].comments);
171171
assert.isDefined(posts[0].comments[0].user);

0 commit comments

Comments
 (0)