Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-pulley committed Aug 3, 2023
1 parent 5d99956 commit 589cdbc
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions merge_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,14 +249,11 @@ func TestGenerateMergeStrategy(t *testing.T) {
ok.Equal("create", actions[0].Action)
ok.Equal(16, actions[0].ID.PrimaryKey)

ok.Equal("update", actions[1].Action)
ok.Equal(12, actions[1].ID.PrimaryKey)

ok.Contains(actions, MergeAction{ID: RecordID{Table: "person", PrimaryKey: 20}, Action: "conflict", Data: map[string]interface{}{"name": "updated_both_complete_branch"}})
ok.Contains(actions, MergeAction{ID: RecordID{Table: "person", PrimaryKey: 20}, Action: "conflicting_double_update", Data: map[string]interface{}{"name": "updated_both_complete_branch"}})
ok.Contains(actions, MergeAction{ID: RecordID{Table: "person", PrimaryKey: 12}, Action: "update", Data: map[string]interface{}{"name": "name_changed_in_branch_completed"}})
ok.Contains(actions, MergeAction{ID: RecordID{Table: "person", PrimaryKey: 20}, Action: "conflict", Data: map[string]interface{}{"name": "updated_both_complete_branch"}})
ok.Contains(actions, MergeAction{ID: RecordID{Table: "person", PrimaryKey: 20}, Action: "conflicting_double_update", Data: map[string]interface{}{"name": "updated_both_complete_branch"}})

ok.Equal("conflict", actions[5].Action)
ok.Equal("conflict_delete_updated", actions[5].Action)
ok.Equal(18, actions[5].ID.PrimaryKey)

ok.Equal("delete", actions[6].Action)
Expand Down

0 comments on commit 589cdbc

Please sign in to comment.