(t *testing.T)
| 29 | ) |
| 30 | |
| 31 | func TestSync_Empty(t *testing.T) { |
| 32 | setup := func(t *testing.T, env testEnv, user database.User) map[string]string { |
| 33 | return map[string]string{} |
| 34 | } |
| 35 | |
| 36 | assert := func(t *testing.T, env testEnv, user database.User, ids map[string]string) { |
| 37 | // Test |
| 38 | checkState(t, env.DB, user, env.ServerDB, systemState{ |
| 39 | clientNoteCount: 0, |
| 40 | clientBookCount: 0, |
| 41 | clientLastMaxUSN: 0, |
| 42 | clientLastSyncAt: serverTime.Unix(), |
| 43 | serverNoteCount: 0, |
| 44 | serverBookCount: 0, |
| 45 | serverUserMaxUSN: 0, |
| 46 | }) |
| 47 | } |
| 48 | |
| 49 | testSyncCmd(t, false, setup, assert) |
| 50 | testSyncCmd(t, true, setup, assert) |
| 51 | } |
| 52 | |
| 53 | func TestSync_oneway(t *testing.T) { |
| 54 | t.Run("cli to api only", func(t *testing.T) { |
nothing calls this directly
no test coverage detected