Skip to content

Conversation

@SomayaB
Copy link

@SomayaB SomayaB commented Sep 13, 2017

Testing the database is separate from the route testing. Contact should be tested in the getContacts function in the integration test.

Testing the database is separate from the route testing. Contact should be tested in the `getContacts` function in the integration test.
- All "End to End" and Integrations tests are setup such that the database tables are truncated, and seeded before each test run.
- End to End testing: Test the http routes exposed in the server
- You have `chai-http` installed
- A test for the `/` GET route to make sure that the correct page is getting rendered and all the contacts are being received from the database
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its possible and totally reasonable to have a test that:

  1. insert users into the database
  2. renders '/'
  3. asserts that the page that was rendered contains the users we put in the database

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SomayaB I would love to have a dialog about this. Can we chat sometime?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah definitely. You can slack me. @SomayaB

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd love for @punitrathore to make the call on this one since its phase 3 curriculum content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants