Created
May 23, 2019 16:15
-
-
Save chelseatroy/736233bf782ca6aeb997bd13f0be7689 to your computer and use it in GitHub Desktop.
Delete Tests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
def test_delete_happy_path | |
db = Database.new | |
db.set "Tufted", "Titmouse" | |
assert_equal("Titmouse", db.get("Tufted")) | |
db.delete "Tufted" | |
assert_equal("NULL", db.get("Tufted")) | |
end | |
def test_delete_absent_key | |
db = Database.new | |
assert_equal("That key isn't in the database!", db.delete("NoKey")) | |
end | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment