@@ -620,10 +620,11 @@ func TestServeMine(t *testing.T) {
620
620
if err != nil {
621
621
t .Fatal (err )
622
622
}
623
- // Seed the database with links
624
- db .Save (& Link {Short : "link1" , Long : "http://example.com/1" , Owner : "user1" })
625
- db .Save (& Link {Short : "link2" , Long : "http://example.com/2" , Owner : "user2" })
626
- db .Save (& Link {Short : "link3" , Long : "http://example.com/3" , Owner : "user1" })
623
+
624
+ // Seed the database with links - update Owner to match login format
625
+ db .
Save (
& Link {
Short :
"link1" ,
Long :
"http://example.com/1" ,
Owner :
"[email protected] " })
626
+ db .
Save (
& Link {
Short :
"link2" ,
Long :
"http://example.com/2" ,
Owner :
"[email protected] " })
627
+ db .
Save (
& Link {
Short :
"link3" ,
Long :
"http://example.com/3" ,
Owner :
"[email protected] " })
627
628
628
629
tests := []struct {
629
630
name string
@@ -637,8 +638,8 @@ func TestServeMine(t *testing.T) {
637
638
return user {
login :
"[email protected] " },
nil
638
639
},
639
640
wantLinks : []* Link {
640
- {Short : "link1" , Long : "http://example.com/1" , Owner : "user1" },
641
- {Short : "link3" , Long : "http://example.com/3" , Owner : "user1" },
641
+ {Short : "link1" , Long : "http://example.com/1" , Owner : "user1@example.com " },
642
+ {Short : "link3" , Long : "http://example.com/3" , Owner : "user1@example.com " },
642
643
},
643
644
wantStatus : http .StatusOK ,
644
645
},
0 commit comments