Add test suite#66
Conversation
|
✔️ Deploy Preview for vlab-research canceled. 🔨 Explore the source changes: 3d2e20a 🔍 Inspect the deploy log: https://app.netlify.com/sites/vlab-research/deploys/6200a5f6bbee6f0007f427fe |
29fc243 to
8321468
Compare
|
Couple thoughts:
|
718f257 to
37b5e7b
Compare
5caf772 to
4afeb28
Compare
4afeb28 to
acec833
Compare
b3273c7 to
0ef81f3
Compare
| ) l USING (userid)`; | ||
| ) l | ||
| USING (userid) | ||
| ORDER BY first_timestamp DESC |
There was a problem hiding this comment.
This is basically a copy and paste from, #59 (comment)
| title: 'New User Title', | ||
| metadata: '{}', | ||
| survey_name: "test", | ||
| translation_conf: '{}', |
There was a problem hiding this comment.
Fields required by DB schema.
| }; | ||
| const newUser = await User.create(user); | ||
|
|
||
| newUser.token.should.equal(user.token); |
There was a problem hiding this comment.
Looks like user.token is not implemented?
| newUser.email.should.equal(user.email); | ||
|
|
||
| user.token = 'HxpnYoykme73Jz1c9DdAxPws77GzH9jLqE1wu1piSqJj'; | ||
| const userUpdated = await User.update(user); |
There was a problem hiding this comment.
Looks like we don't have a User.update() method.
| }; | ||
| await User.create(user); | ||
| const userFromDb = await User.user(user); | ||
| userFromDb.token.should.equal(user.token); |
There was a problem hiding this comment.
Looks like user doesn't contain token.
| @@ -0,0 +1,2 @@ | |||
| ALTER TABLE chatroach.states ADD CONSTRAINT valid_state_json CHECK (state_json ? 'state'); | |||
| @@ -0,0 +1,2 @@ | |||
| ALTER TABLE chatroach.states ADD CONSTRAINT valid_state_json CHECK (state_json ? 'state'); | |||
| ALTER TABLE chatroach.states ADD CONSTRAINT fk_facebook_page_id FOREIGN KEY (pageid) REFERENCES chatroach.credentials(facebook_page_id) ON DELETE CASCADE; | |||
| args := m.Called(id, url) | ||
| return args.Error(0) | ||
| } | ||
|
|
There was a problem hiding this comment.
This looks like dead code.
| assert.Equal(t, "25", *res[2]) | ||
| assert.Equal(t, "25", *res[0]) | ||
| assert.Equal(t, "true", *res[1]) | ||
| assert.Equal(t, "yes", *res[2]) |
There was a problem hiding this comment.
Strangely, results are returned in a diff order. Is this an ok behavior?
|
|
||
| mustExec(t, pool, "drop table responses") | ||
| assert.Equal(t, "123", *res[0]) | ||
| assert.Equal(t, "baz", *res[2]) |
There was a problem hiding this comment.
Strangely, results are returned in a diff order. Is this an ok behavior?
| assert.Equal(t, "LOL", *res[0]) | ||
| assert.Equal(t, "A", *res[1]) | ||
| assert.Equal(t, "A", *res[0]) | ||
| assert.Equal(t, "LOL", *res[1]) |
There was a problem hiding this comment.
Strangely, results are returned in a diff order. Is this an ok behavior?
|
Alright, just double-check the code. Left some comments. The only services we didn't add test-suites to are:
|
|
For test coverage on services written in |
aed15fe to
3a63a22
Compare
Ticket: #64
TODO:
go.modAdd test suite to: