Skip to content

Commit 30a124a

Browse files
committed
Added making a second call to ListRecords to the stubbedTests
1 parent 3f8d9b3 commit 30a124a

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

tests/stubbed_tests/client_test.go

+6
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ func (s *ClientSuite) TestListRecords(c *C) {
6767
err := client.ListRecords(testBase.TasksTableName, &tasks)
6868
c.Assert(err, Equals, nil)
6969
c.Assert(len(tasks), Equals, 3)
70+
71+
tasks2 := []testBase.Task{}
72+
client.HTTPClient = newFakeHTTPClient(200, "../test_responses/list_tasks_2.json")
73+
err = client.ListRecords(testBase.TasksTableName, &tasks2)
74+
c.Assert(err, Equals, nil)
75+
c.Assert(len(tasks2), Equals, 2)
7076
}
7177

7278
func (s *ClientSuite) TestAirtableError(c *C) {
+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"records": [
3+
{
4+
"id": "recQOsV8vkv8WVJ5D",
5+
"fields": {
6+
"Name": "Open art gallery",
7+
"Notes": "Open art gallery for the up and coming artists of neuband",
8+
"Design Projects": [
9+
"rec1yR2VnbH9VPr0I"
10+
],
11+
"Time Estimate (days)": 5.5
12+
},
13+
"createdTime": "2015-05-20T22:39:02.000Z"
14+
},
15+
{
16+
"id": "recQja5flwaDDQVgh",
17+
"fields": {
18+
"Name": "Laser cut badges",
19+
"Assignee": [
20+
"recoFEbHu7Gjt8fdc"
21+
],
22+
"Design Projects": [
23+
"rec4wnTcRBztflU5l"
24+
],
25+
"Time Estimate (days)": 0.5
26+
},
27+
"createdTime": "2015-01-15T22:02:39.000Z"
28+
}
29+
]
30+
}

0 commit comments

Comments
 (0)