update
This commit is contained in:
17
remote-grain_test.go
Normal file
17
remote-grain_test.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package main
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestCartIdsNullData(t *testing.T) {
|
||||
data := MakeCartInnerFrame(ToCartId("kalle"), nil)
|
||||
cart, err := GetCartFrame(data)
|
||||
if err != nil {
|
||||
t.Errorf("Error getting cart: %v", err)
|
||||
}
|
||||
if cart.Id.String() != "kalle" {
|
||||
t.Errorf("Expected kalle, got %s", cart.Id)
|
||||
}
|
||||
if len(cart.Data) != 0 {
|
||||
t.Errorf("Expected no data, got %v", cart.Data)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user