models.TestPhotoReport_can_hold_information   A
last analyzed

Complexity

Conditions 4

Size

Total Lines 17
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 4
eloc 11
nop 1
dl 0
loc 17
rs 9.85
c 0
b 0
f 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
	}
25
}
26