func TestMasterKeyModify(t *testing.T) { t.Parallel() var req http.Request k := parse.MasterKey{ ApplicationID: defaultApplicationID, MasterKey: "42", } ensure.Nil(t, k.Modify(&req)) ensure.DeepEqual(t, req.Header.Get("X-Parse-Application-ID"), k.ApplicationID) ensure.DeepEqual(t, req.Header.Get("X-Parse-Master-Key"), k.MasterKey) }
func TestEmptyMasterKey(t *testing.T) { t.Parallel() mk := parse.MasterKey{ApplicationID: defaultApplicationID} ensure.Err(t, mk.Modify(nil), regexp.MustCompile("empty MasterKey")) }
func TestMasterKeyEmptyApplicationID(t *testing.T) { t.Parallel() var mk parse.MasterKey ensure.Err(t, mk.Modify(nil), regexp.MustCompile("empty ApplicationID")) }