Merge branch '15107-google-login'
[arvados.git] / sdk / go / arvados / resource_list_test.go
index 5642599b4c5664a16a7b1342887748863f9c2715..4e09c5375db980c60171f9209714c81f55aef152 100644 (file)
@@ -23,3 +23,14 @@ func TestMarshalFiltersWithNanoseconds(t *testing.T) {
                t.Errorf("Encoded as %q, expected %q", buf, expect)
        }
 }
+
+func TestMarshalFiltersWithNil(t *testing.T) {
+       buf, err := json.Marshal([]Filter{
+               {Attr: "modified_at", Operator: "=", Operand: nil}})
+       if err != nil {
+               t.Fatal(err)
+       }
+       if expect := []byte(`[["modified_at","=",null]]`); 0 != bytes.Compare(buf, expect) {
+               t.Errorf("Encoded as %q, expected %q", buf, expect)
+       }
+}