| Conditions | 4 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | package models |
||
| 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 |