Add test condition for camera model

This commit is contained in:
Theresa Gresch 2019-07-16 14:11:33 +02:00
parent 6d194f142e
commit 7f444185c0

View file

@ -36,7 +36,7 @@ func TestNewCamera(t *testing.T) {
}
assert.Equal(t, expected, camera)
})
t.Run("model make Unknown", func(t *testing.T) {
t.Run("model TG-4 make Unknown", func(t *testing.T) {
camera := NewCamera("TG-4", "")
expected := &Camera{
@ -46,6 +46,16 @@ func TestNewCamera(t *testing.T) {
}
assert.Equal(t, expected, camera)
})
t.Run("model Unknown make Unknown", func(t *testing.T) {
camera := NewCamera("", "")
expected := &Camera{
CameraModel: "Unknown",
CameraMake: "",
CameraSlug: "unknown",
}
assert.Equal(t, expected, camera)
})
}
/* TODO find way to initialize db independently from config