models/photo_report_test.go   A
last analyzed

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
cc 4
eloc 14
dl 0
loc 23
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A models.TestPhotoReport_can_hold_information 0 17 4
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