Unit test for issue #976
(t *testing.T)
| 2635 | |
| 2636 | // Unit test for issue #976 |
| 2637 | func TestWithNullPropertyKey(t *testing.T) { |
| 2638 | |
| 2639 | db, ctx := setupTestDB(t) |
| 2640 | defer db.Close(ctx) |
| 2641 | collection, ctx := GetSingleDatabaseCollectionWithUser(ctx, t, db) |
| 2642 | |
| 2643 | // Test creating a document with null property key |
| 2644 | customDocId := "customIdValue" |
| 2645 | log.Printf("Create document with empty property key") |
| 2646 | body := Body{BodyId: customDocId, "": "value1"} |
| 2647 | docid, rev1id, _, err := collection.Post(ctx, body) |
| 2648 | require.NoError(t, err) |
| 2649 | assert.True(t, rev1id != "") |
| 2650 | assert.True(t, docid != "") |
| 2651 | } |
| 2652 | |
| 2653 | // Unit test for issue #507, modified for CBG-1995 (allowing special properties) |
| 2654 | func TestPostWithUserSpecialProperty(t *testing.T) { |
nothing calls this directly
no test coverage detected