-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from eldr-io/fix/rename-user-model
fix #2 - Refactor user model to "guest" to avoid postgres internals name clash
- Loading branch information
Showing
9 changed files
with
94 additions
and
101 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
module Api.GuestSpec where | ||
|
||
import Data.Time (getCurrentTime) | ||
import Models (Guest (Guest), guestCreatedAt, guestEmail, guestName) | ||
import Test.Hspec (Spec, before, context, describe, it, shouldBe) | ||
|
||
spec :: Spec | ||
spec = before | ||
( do | ||
time <- getCurrentTime | ||
pure time | ||
) | ||
$ do | ||
describe "templates" $ do | ||
context "when rendering a guest" $ do | ||
it "renders a guest" $ | ||
( \currentTime -> do | ||
let guest = | ||
Guest | ||
{ guestName = "bobby" | ||
, guestEmail = "[email protected]" | ||
, guestCreatedAt = currentTime | ||
} | ||
-- let entity = Entity (Key user) user | ||
guestName guest `shouldBe` "bobby" | ||
) |
This file was deleted.
Oops, something went wrong.