Skip to content

Commit

Permalink
test: add test_unsuccessful_unmock
Browse files Browse the repository at this point in the history
  • Loading branch information
Chemaclass committed Dec 10, 2023
1 parent bcbf6f9 commit 0c66a58
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/unit/test_doubles_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ function test_successful_unmock_spy() {
assert_is_not_mock ps
}

function test_unsuccessful_unmock() {
assert_equals\
"$(console_results::print_failed_test "Unsuccessful unmock" "ps" "to be a mock" "but is not a mock")"\
"$(assert_is_mock ps)"
}

function test_successful_override_ps_with_echo_with_mock() {
mock ps echo hello world
assert_equals "hello world" "$(ps)"
Expand Down

0 comments on commit 0c66a58

Please sign in to comment.