Skip to content

Commit

Permalink
Adjusts answer tests
Browse files Browse the repository at this point in the history
  • Loading branch information
coconutcraig committed Nov 17, 2018
1 parent 11ae9de commit 59a907d
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/models/answer.test.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import Answer from './answer';

it('will set the question identifier', async () => {
it('will set the question identifier and answer value', async () => {
const answer = new Answer;

expect(answer.for(1)).toHaveProperty('question', 1);
});

it('will set the answer value', async () => {
const answer = new Answer;

expect(answer.is('the answer')).toHaveProperty('value', 'the answer');
expect(answer.for(1).is('the answer')).toHaveProperty('attributes', {
question: 1,
value: 'the answer',
});
});

0 comments on commit 59a907d

Please sign in to comment.