Last active
August 29, 2015 13:57
-
-
Save meaganewaller/9796171 to your computer and use it in GitHub Desktop.
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
(ns wishes.wishlist-spec | |
(:require | |
[wishes.wishlist :refer all] | |
[speclj.core :refer all])) | |
(describe "Wishlist" | |
(with fake-wishlist | |
{:name "Fake Wishlist" | |
:description "My Fake Wishlist"}) | |
; a function would go here called something like setup-test-db that would setup our test databases. | |
(it "associates a token with a new wishlist" | |
(with-redefs [generate-token (fn [] "footoken")] | |
(let [wishlist (save @fake-wishlist) ; using the fake-wishlist we defined from line 7 | |
wishlist-key (:key wishlist)] | |
(should= "footoken" (:token (find-by-key wishlist-key))))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment