Total Lines | 23 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | package models |
||
2 | |||
3 | import ( |
||
4 | "testing" |
||
5 | ) |
||
6 | |||
7 | func TestPhotoReport_can_hold_information(t *testing.T) { |
||
8 | photoReport := PhotoReport{ |
||
9 | Title: "Hello world", |
||
10 | Image: "http://test.com", |
||
11 | URL: "http://url.com", |
||
12 | } |
||
13 | |||
14 | if photoReport.Title != "Hello world" { |
||
15 | t.Error("PhotoReport model doesn't have value in its Title field") |
||
16 | } |
||
17 | |||
18 | if photoReport.Image != "http://test.com" { |
||
19 | t.Error("PhotoReport model doesn't have value in its Image field") |
||
20 | } |
||
21 | |||
22 | if photoReport.URL != "http://url.com" { |
||
23 | t.Error("PhotoReport model doesn't have value in its URL field") |
||
24 | } |
||
26 |