Skip to content

Commit

Permalink
Added tests for static dataset type
Browse files Browse the repository at this point in the history
  • Loading branch information
aryan-p03 committed Nov 18, 2024
1 parent 963a2e3 commit d562530
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion models/dataset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ func TestString(t *testing.T) {
So(datasetTypes[3], ShouldEqual, "cantabular_blob")
So(datasetTypes[4], ShouldEqual, "cantabular_flexible_table")
So(datasetTypes[5], ShouldEqual, "cantabular_multivariate_table")
So(datasetTypes[6], ShouldEqual, "invalid")
So(datasetTypes[6], ShouldEqual, "static")
So(datasetTypes[7], ShouldEqual, "invalid")
})
})
}
Expand Down Expand Up @@ -102,6 +103,14 @@ func TestGetDatasetType(t *testing.T) {
})
})

Convey("When the type is static", func() {
Convey("Then it should return the appropriate value", func() {
result, err := GetDatasetType("static")
So(result, ShouldEqual, Static)
So(err, ShouldBeNil)
})
})

Convey("When the type is invalid", func() {
Convey("Then an error should be returned", func() {
result, err := GetDatasetType("abcdefg")
Expand Down

0 comments on commit d562530

Please sign in to comment.