Skip to content

Commit

Permalink
modify test to ensure data integrity
Browse files Browse the repository at this point in the history
  • Loading branch information
BlockListed committed Oct 29, 2024
1 parent 8ead6c0 commit d1ba01f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions test/lamb_test.gleam
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import artifacts/record.{Admin, User}
import artifacts/record.{Admin, User, Client}
import artifacts/setup
import gleam/list
import gleeunit
Expand Down Expand Up @@ -97,10 +97,17 @@ pub fn simple_query_test() {
#("c", record.random(3)),
])

let assert Ok(_) = lamb.get(table, "a")
let assert Ok(a) = lamb.get(table, "a")
let assert Ok(_) = lamb.get(table, "b")
let assert Ok(_) = lamb.get(table, "c")
let assert Error(_) = lamb.get(table, "d")

// just make sure that `a` is actually a type/record
case a {
Admin(..) -> Nil
User(..) -> Nil
Client(..) -> Nil
}
})

setup.table("retrieve all", fn(table) {
Expand Down

0 comments on commit d1ba01f

Please sign in to comment.