-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmessage_test.go
More file actions
39 lines (36 loc) · 769 Bytes
/
message_test.go
File metadata and controls
39 lines (36 loc) · 769 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package main
import (
"strconv"
"testing"
)
var message = Message {
Payload: []Show {
Show {
Drm: true,
EpisodeCount: 3,
Img: Image { "http://catchup.com.au/1280.jpg" },
Slug: "show/16kidsandcounting",
Title: "16 Kids and Counting",
},
Show {
Slug: "show/seapatrol",
Title: "Sea Patrol",
},
Show {
Drm: true,
EpisodeCount: 2,
Img: Image { "http://catchup.com.au/1280.jpg" },
Slug: "show/thetaste",
Title: "The Taste (Le Goût)",
},
},
Skip: 0,
Take: 10,
TotalRecords: 75,
}
func TestFilter(t *testing.T) {
response := message.Filter()
if len(response) != 2 {
t.Error("Expected response length to be 2 but is ", strconv.Itoa(len(response)))
}
}