From 99d1d948523e33407dc64376a31d0e1c280387f9 Mon Sep 17 00:00:00 2001 From: Jeff Kreeftmeijer Date: Sun, 17 Jan 2021 16:03:11 +0100 Subject: Ensure atom exists before atom from_string_test `atom_test.from_string_test/0` uses `ok` to test `atom.from_string/0`. However, the availability of the `ok` atom seems to be a side effect of running the test trough eunit. This patch explicitly creates an atom to make sure it exists before using it to test `atom.from_string/1`. It removes the assertion on `expect`, which had the same issue and doesn't seem to test another case. --- test/gleam/atom_test.gleam | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/gleam/atom_test.gleam b/test/gleam/atom_test.gleam index 4617489..228791d 100644 --- a/test/gleam/atom_test.gleam +++ b/test/gleam/atom_test.gleam @@ -2,11 +2,9 @@ import gleam/atom import gleam/should pub fn from_string_test() { - "ok" - |> atom.from_string - |> should.be_ok + atom.create_from_string("this is an existing atom") - "expect" + "this is an existing atom" |> atom.from_string |> should.be_ok -- cgit v1.2.3