Skip to content

Commit 67e6502

Browse files
committed
Make update test a little stronger
`update` should retain old values. This could be made even better with some level of validation (middleware?).
1 parent 578c137 commit 67e6502

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

immutable_app/tests/lane_reducer_test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ describe('LaneReducer', () => {
4545
assert.equal(lanes.count(), 1);
4646
assert.equal(lanes.get(0).get('id'), lane.id);
4747
assert.equal(lanes.get(0).get('name'), updatedName);
48+
assert.equal(lanes.get(0).get('notes').count(), 0);
4849
});
4950

5051
it('should not crash while updating a non-existent lane', () => {

immutable_app/tests/note_reducer_test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ describe('NoteReducer', () => {
2222
it('should update notes', () => {
2323
const note = {
2424
id: 'foobar',
25-
task: 'test'
25+
task: 'test',
26+
editing: true
2627
};
2728
const updatedTask = 'foofoo';
2829

@@ -39,6 +40,7 @@ describe('NoteReducer', () => {
3940
assert.equal(state.count(), 1);
4041
assert.equal(state.get(0).get('id'), note.id);
4142
assert.equal(state.get(0).get('task'), updatedTask);
43+
assert.equal(state.get(0).get('editing'), note.editing);
4244
});
4345

4446
it('should not crash while updating a non-existent note', () => {

0 commit comments

Comments
 (0)