Add test condition for camera model
This commit is contained in:
parent
6d194f142e
commit
7f444185c0
1 changed files with 11 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue