Skip to content

Commit

Permalink
Expand tests to verify maintenance info fields individually
Browse files Browse the repository at this point in the history
  • Loading branch information
Derik Evangelista committed Aug 22, 2019
1 parent 3efafc0 commit faf0fa5
Showing 1 changed file with 16 additions and 28 deletions.
44 changes: 16 additions & 28 deletions domain/maintenance_info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,22 @@ var _ = Describe("MaintenanceInfo", func() {
Version: "1.2.3",
Description: "test",
}),
Entry(
"one property is different",
domain.MaintenanceInfo{
Public: map[string]string{"foo": "bar"},
Private: "test",
Version: "1.2.3",
Description: "test-different",
},
domain.MaintenanceInfo{
Public: map[string]string{"foo": "bar"},
Private: "test-not-the-same",
Version: "1.2.3",
Description: "test",
}),
Entry("public field is different",
domain.MaintenanceInfo{Public: map[string]string{"foo": "bar"}},
domain.MaintenanceInfo{Public: map[string]string{"foo": "foo"}},
),
Entry("private field is different",
domain.MaintenanceInfo{Private: "foo"},
domain.MaintenanceInfo{Private: "bar"},
),
Entry("version field is different",
domain.MaintenanceInfo{Version: "1.2.0"},
domain.MaintenanceInfo{Version: "2.2.2"},
),
Entry("description field is different",
domain.MaintenanceInfo{Description: "amazing"},
domain.MaintenanceInfo{Description: "terrible"},
),
Entry(
"all properties are missing in one of the objects",
domain.MaintenanceInfo{
Expand All @@ -61,20 +63,6 @@ var _ = Describe("MaintenanceInfo", func() {
Description: "test",
},
domain.MaintenanceInfo{}),
Entry(
"all properties are defined but different",
domain.MaintenanceInfo{
Public: map[string]string{"foo": "bar"},
Private: "test",
Version: "1.2.3",
Description: "test",
},
domain.MaintenanceInfo{
Public: map[string]string{"bar": "foo"},
Private: "test-not-the-same",
Version: "8.9.6-rc3",
Description: "test-different",
}),
)

DescribeTable(
Expand Down

0 comments on commit faf0fa5

Please sign in to comment.