| Conditions | 4 |
| Total Lines | 19 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | package test |
||
| 9 | func TestFetchTodayCard(t *testing.T) { |
||
| 10 | tests := []struct { |
||
| 11 | name string |
||
| 12 | userID uint |
||
| 13 | want bool |
||
| 14 | }{ |
||
| 15 | { |
||
| 16 | name: "fetch today card", |
||
| 17 | userID: 6, |
||
| 18 | want: true, |
||
| 19 | }, |
||
| 20 | } |
||
| 21 | |||
| 22 | Setup() |
||
| 23 | |||
| 24 | for _, tt := range tests { |
||
| 25 | t.Run(tt.name, func(t *testing.T) { |
||
| 26 | if got := queries.FetchTodayCard(tt.userID); !reflect.DeepEqual(got.Success, tt.want) { |
||
| 27 | t.Errorf("FetchTodayCard() = %v, want %v", got, tt.want) |
||
| 28 | } |
||
| 32 |