aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/gleam/option_test.gleam8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/gleam/option_test.gleam b/test/gleam/option_test.gleam
index a6f2cc3..e41c221 100644
--- a/test/gleam/option_test.gleam
+++ b/test/gleam/option_test.gleam
@@ -32,3 +32,11 @@ pub fn from_result_test() {
option.from_result(Error("some_error"))
|> should.equal(None)
}
+
+pub fn unwrap_option_test() {
+ option.unwrap(Some(1), 0)
+ |> should.equal(1)
+
+ option.unwrap(None, 0)
+ |> should.equal(0)
+}