forked from zoom-lib-golang/zoom-lib-golang
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcloud_recording_test.go
More file actions
52 lines (41 loc) · 1023 Bytes
/
cloud_recording_test.go
File metadata and controls
52 lines (41 loc) · 1023 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
40
41
42
43
44
45
46
47
48
49
50
51
52
// +build integration foo
package zoom
import (
"os"
"testing"
)
func TestListAllRecordings(t *testing.T) {
var (
apiKey = os.Getenv("ZOOM_API_KEY")
apiSecret = os.Getenv("ZOOM_API_SECRET")
primaryUser = os.Getenv("ZOOM_EXAMPLE_EMAIL")
one = int(1)
)
APIKey = apiKey
APISecret = apiSecret
_, err := ListAllRecordings(ListAllRecordingsOptions{
UserID: primaryUser,
PageSize: &one,
From: "2019-11-01",
To: "2019-12-01",
})
if err != nil {
t.Fatalf("got error listing recordings: %+v\n", err)
}
}
func TestGetMeetingRecordingsNoRecording(t *testing.T) {
var (
apiKey = os.Getenv("ZOOM_API_KEY")
apiSecret = os.Getenv("ZOOM_API_SECRET")
)
APIKey = apiKey
APISecret = apiSecret
_, err := GetMeetingRecordings(GetMeetingRecordingsOptions{
MeetingID: "FooBar",
})
expected := `Zoom API error 3301: "This recording does not exist."`
actual := err.Error()
if actual != expected {
t.Errorf(`Expected error "%s". Got "%s".`, expected, actual)
}
}