@@ -314,12 +314,20 @@ var _ = Describe("Domains", func() {
314314 _ , err := b .ReadFrom (res .Body )
315315 Expect (err ).To (BeNil ())
316316
317+ dom := & domain.Domain {}
318+ err = db .Last (dom ).Error
319+ Expect (err ).To (BeNil ())
320+
321+ createdAtJSON , err := dom .CreatedAt .MarshalJSON ()
322+ Expect (err ).To (BeNil ())
323+
317324 Expect (res .StatusCode ).To (Equal (http .StatusCreated ))
318- Expect (b .String ()).To (MatchJSON (`{
325+ Expect (b .String ()).To (MatchJSON (fmt . Sprintf ( `{
319326 "domain": {
320- "name": "www.foo-bar-express.com"
327+ "name": "www.foo-bar-express.com",
328+ "created_at": %s
321329 }
322- }` ))
330+ }` , createdAtJSON ) ))
323331 })
324332 })
325333
@@ -369,12 +377,20 @@ var _ = Describe("Domains", func() {
369377 _ , err := b .ReadFrom (res .Body )
370378 Expect (err ).To (BeNil ())
371379
380+ dom := & domain.Domain {}
381+ err = db .Last (dom ).Error
382+ Expect (err ).To (BeNil ())
383+
384+ createdAtJSON , err := dom .CreatedAt .MarshalJSON ()
385+ Expect (err ).To (BeNil ())
386+
372387 Expect (res .StatusCode ).To (Equal (http .StatusCreated ))
373- Expect (b .String ()).To (MatchJSON (`{
388+ Expect (b .String ()).To (MatchJSON (fmt . Sprintf ( `{
374389 "domain": {
375- "name": "www.foo-bar-express.com"
390+ "name": "www.foo-bar-express.com",
391+ "created_at": %s
376392 }
377- }` ))
393+ }` , createdAtJSON ) ))
378394 })
379395
380396 It ("creates a domain record in the DB" , func () {
@@ -400,12 +416,20 @@ var _ = Describe("Domains", func() {
400416 _ , err := b .ReadFrom (res .Body )
401417 Expect (err ).To (BeNil ())
402418
419+ dom := & domain.Domain {}
420+ err = db .Last (dom ).Error
421+ Expect (err ).To (BeNil ())
422+
423+ createdAtJSON , err := dom .CreatedAt .MarshalJSON ()
424+ Expect (err ).To (BeNil ())
425+
403426 Expect (res .StatusCode ).To (Equal (http .StatusCreated ))
404- Expect (b .String ()).To (MatchJSON (`{
427+ Expect (b .String ()).To (MatchJSON (fmt . Sprintf ( `{
405428 "domain": {
406- "name": "www.foo-bar-express.com"
429+ "name": "www.foo-bar-express.com",
430+ "created_at": %s
407431 }
408- }` ))
432+ }` , createdAtJSON ) ))
409433 })
410434
411435 It ("creates a domain record in the DB" , func () {
@@ -429,12 +453,16 @@ var _ = Describe("Domains", func() {
429453 _ , err := b .ReadFrom (res .Body )
430454 Expect (err ).To (BeNil ())
431455
456+ createdAtJSON , err := dom .CreatedAt .MarshalJSON ()
457+ Expect (err ).To (BeNil ())
458+
432459 Expect (res .StatusCode ).To (Equal (http .StatusCreated ))
433- Expect (b .String ()).To (MatchJSON (`{
460+ Expect (b .String ()).To (MatchJSON (fmt . Sprintf ( `{
434461 "domain": {
435- "name": "www.foo-bar-express.com"
462+ "name": "www.foo-bar-express.com",
463+ "created_at": %s
436464 }
437- }` ))
465+ }` , createdAtJSON ) ))
438466
439467 Expect (dom .Name ).To (Equal ("www.foo-bar-express.com" ))
440468 Expect (dom .ProjectID ).To (Equal (proj .ID ))
0 commit comments