Created
May 9, 2019 07:01
-
-
Save kianaditya/f471201a3991e2aa63dea8b58298ee19 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
beforeEach(() => { | |
cy.server(); | |
cy.route({ | |
method: "GET", | |
url: "http://localhost:3000/sessions?page=1", | |
response: "fixture:sessionpage_1.json" | |
}); | |
cy.route({ | |
method: "GET", | |
url: "http://localhost:3000/sessions?page=2", | |
response: "fixture:sessionpage_2.json" | |
}); | |
cy.route({ | |
method: "POST", | |
status: "200", | |
url: "http://localhost:3000/sessions", | |
response: "fixture:create_session.json" | |
}); | |
cy.route({ | |
method: "POST", | |
status: "200", | |
url: "http://localhost:3000/sessions/91/rsvps", | |
response: "fixture:book_session.json" | |
}); | |
cy.route({ | |
method: "DELETE", | |
url: "http://localhost:3000/auth/sign_out", | |
response: "fixture:logout.json" | |
}); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment