|
@@ -41,14 +41,18 @@ var _ = Describe("Server actions", func() {
|
|
|
action.FromClient = &myClient
|
|
action.FromClient = &myClient
|
|
|
|
|
|
|
|
songId := 123
|
|
songId := 123
|
|
|
|
|
+ playing := true
|
|
|
|
|
+ currentTime := float32(94)
|
|
|
|
|
+ seekTime := float32(-1)
|
|
|
|
|
+
|
|
|
expectedAction := server.Action{
|
|
expectedAction := server.Action{
|
|
|
Type: server.StateSet,
|
|
Type: server.StateSet,
|
|
|
FromClient: &myClient,
|
|
FromClient: &myClient,
|
|
|
Payload: server.MusicPlayer{
|
|
Payload: server.MusicPlayer{
|
|
|
SongId: &songId,
|
|
SongId: &songId,
|
|
|
- Playing: true,
|
|
|
|
|
- CurrentTime: 94,
|
|
|
|
|
- SeekTime: -1,
|
|
|
|
|
|
|
+ Playing: &playing,
|
|
|
|
|
+ CurrentTime: ¤tTime,
|
|
|
|
|
+ SeekTime: &seekTime,
|
|
|
Master: "some-master-client",
|
|
Master: "some-master-client",
|
|
|
ActiveClients: &[]string{},
|
|
ActiveClients: &[]string{},
|
|
|
Queue: &[]int{},
|
|
Queue: &[]int{},
|
|
@@ -85,13 +89,17 @@ var _ = Describe("Server actions", func() {
|
|
|
var action server.Action
|
|
var action server.Action
|
|
|
json.Unmarshal([]byte(actionStateSetSongIdNull), &action)
|
|
json.Unmarshal([]byte(actionStateSetSongIdNull), &action)
|
|
|
|
|
|
|
|
|
|
+ playing := false
|
|
|
|
|
+ currentTime := float32(0)
|
|
|
|
|
+ seekTime := float32(-1)
|
|
|
|
|
+
|
|
|
expectedAction := server.Action{
|
|
expectedAction := server.Action{
|
|
|
Type: server.StateSet,
|
|
Type: server.StateSet,
|
|
|
Payload: server.MusicPlayer{
|
|
Payload: server.MusicPlayer{
|
|
|
SongId: nil,
|
|
SongId: nil,
|
|
|
- Playing: false,
|
|
|
|
|
- CurrentTime: 0,
|
|
|
|
|
- SeekTime: -1,
|
|
|
|
|
|
|
+ Playing: &playing,
|
|
|
|
|
+ CurrentTime: ¤tTime,
|
|
|
|
|
+ SeekTime: &seekTime,
|
|
|
Master: "some-master-client",
|
|
Master: "some-master-client",
|
|
|
ActiveClients: &[]string{},
|
|
ActiveClients: &[]string{},
|
|
|
Queue: &[]int{},
|
|
Queue: &[]int{},
|