Skip to content
This repository has been archived by the owner on Jul 24, 2020. It is now read-only.

Integration Tests #416

Closed
8 of 9 tasks
austinczarnecki opened this issue Jul 8, 2013 · 19 comments · Fixed by #1219
Closed
8 of 9 tasks

Integration Tests #416

austinczarnecki opened this issue Jul 8, 2013 · 19 comments · Fixed by #1219

Comments

@austinczarnecki
Copy link
Contributor

#2015-03-02

Here are things we should have tests for:

  • creating a reservation
    • as a patron
    • as a checkout person
  • checking out equipment
  • reservation actions
    • renewing a reservation
  • checking in equipment
  • admin actions?
  • Active Admin (working routes)

Original

Start making some integration tests, probably most important to do this for the process of making a reservation.

@shippy
Copy link
Contributor

shippy commented Jun 19, 2014

Putting this in 3.3.0 milestone. We should probably create five to ten integration tests for the most common scenarios that we have in our user documentation?

This was referenced Jun 23, 2014
@squidgetx
Copy link
Contributor

If we really change up how the reservation workflow goes (via #523) we should either hold off on these tests or do like the real TDDrs do and write these tests with that new workflow in mind

@squidgetx
Copy link
Contributor

Important Workflows

  • Reservation making process
    • By users
    • By checkout people (for other users)
  • Checking out equipment
  • Checking in equipment

@squidgetx
Copy link
Contributor

Conclusions after trying for a few hours to set up an integration test: this stuff is not for CAS. Controller stubbing is strongly discouraged in feature/request/integration testing and I wasn't able to bypass the current_user method in application controller to get to the meat of the app.

The only way this could go forward is if we had access to a dummy CAS account. The dev would have to log into this account manually in the browser and then run the test (which creates a user with the same netID).

I'm moving this out of 3.3.0 but I'm not closing, as this information may be useful in the future and/or if anyone every figures out how to deal with this.

@shippy
Copy link
Contributor

shippy commented Jul 9, 2014

As a sidenote, this is a strong incentive to get #2 done.

@orenyk
Copy link
Contributor

orenyk commented Jul 9, 2014

Yes definitely. Maybe we can push for that for 4.1.0?

@dgoerger dgoerger added this to the 4.1.0 milestone Jul 10, 2014
@orenyk
Copy link
Contributor

orenyk commented Aug 26, 2014

We are getting help from ITS regarding integration tests w/ Rails apps; I will update this issue with more information as it becomes available.

@orenyk
Copy link
Contributor

orenyk commented Sep 3, 2014

RubyCAS apparently has a method to fake CAS: https://github.com/rubycas/rubycas-client#testing

We should put this to good use and get those integration tests up and running!

@orenyk orenyk self-assigned this Apr 1, 2015
@orenyk
Copy link
Contributor

orenyk commented Apr 1, 2015

Started writing up some helpers and tests for basic reservation actions. These tests are taking a while, though, so I'm worried about bloating our test suite...

@orenyk
Copy link
Contributor

orenyk commented Apr 3, 2015

Ok, equipment handling is done, working on renewals now.

@orenyk
Copy link
Contributor

orenyk commented Apr 3, 2015

Looking at Travis, it looks like I've somehow broken some of our other specs (EquipmentModelsController and User) - it seems like the database isn't being properly cleaned? I'll investigate next time.

@orenyk
Copy link
Contributor

orenyk commented Apr 3, 2015

Nope, we've got intermittently failing specs again :-. I fixed the set_the_flash deprecation that was re-introduced by #1194 (merge conflict gone wrong) and on the first pass through the specs there were a couple of failures but none after that. Travis is now happy, so hopefully it will stay that way.

@orenyk
Copy link
Contributor

orenyk commented Apr 3, 2015

Ok, this is basically ready; I don't know what "admin routes" I meant above, so I'm going to open a PR. Woot!

orenyk added a commit that referenced this issue Apr 3, 2015
Resolves #416
- add tests for Reservation actions (creation, equipment handling, renewal)
- add tests for Rails Admin routes
- resolve issue with renewals (see #1218)
- add numerous helpers for integration tests
- misc cleanup of other tests
- resolve deprecation warning reintroduced by #1081
orenyk added a commit that referenced this issue Apr 8, 2015
Resolves #416
- add tests for Reservation actions (creation, equipment handling, renewal)
- add tests for Rails Admin routes
- resolve issue with renewals (see #1218)
- add numerous helpers for integration tests
- misc cleanup of other tests
- resolve deprecation warning reintroduced by #1081
@orenyk orenyk modified the milestones: 5.2.0, 5.3.0 Apr 14, 2015
orenyk added a commit that referenced this issue Apr 16, 2015
Resolves #416
- add tests for Reservation actions (creation, equipment handling, renewal)
- add tests for Rails Admin routes
- resolve issue with renewals (see #1218)
- add numerous helpers for integration tests
- misc cleanup of other tests
- resolve deprecation warning reintroduced by #1081
- clean up tests from #987
orenyk added a commit that referenced this issue Apr 20, 2015
Resolves #416
- add tests for Reservation actions (creation, equipment handling, renewal)
- add tests for Rails Admin routes
- resolve issues with renewals (see #1218)
- add numerous helpers for integration tests
- misc cleanup of other tests
- resolve deprecation warning reintroduced by #1081
- clean up tests from #987
orenyk added a commit that referenced this issue Apr 20, 2015
Resolves #416
- add tests for Reservation actions (creation, equipment handling, renewal)
- add tests for Rails Admin routes
- resolve issues with renewals and add specs (see #1218)
- add numerous helpers for integration tests
- misc cleanup of other tests
- resolve deprecation warning reintroduced by #1081
- clean up tests from #987
orenyk added a commit that referenced this issue Apr 20, 2015
Resolves #416
- add tests for Reservation actions (creation, equipment handling, renewal)
- add tests for Rails Admin routes
- resolve issues with renewals and add specs (see #1218)
- add numerous helpers for integration tests
- misc cleanup of other tests
- resolve deprecation warning reintroduced by #1081
- clean up tests from #987
orenyk added a commit that referenced this issue Apr 20, 2015
Resolves #416
- add tests for Reservation actions (creation, equipment handling, renewal)
- add tests for Rails Admin routes
- resolve issue with renewals (see #1218)
- add numerous helpers for integration tests
- misc cleanup of other tests
- resolve deprecation warning reintroduced by #1081
- clean up tests from #987
orenyk added a commit that referenced this issue Apr 21, 2015
Resolves #416
- add tests for Reservation actions (creation, equipment handling, renewal)
- add tests for Rails Admin routes
- resolve issues with renewals and add specs (see #1218)
- add numerous helpers for integration tests
- misc cleanup of other tests
- resolve deprecation warning reintroduced by #1081
- clean up tests from #987
- refactored the for_eq_model Reservation scope not to call .finalized
orenyk added a commit that referenced this issue Apr 24, 2015
Resolves #416
- add tests for Reservation actions (creation, equipment handling, renewal)
- add tests for Rails Admin routes
- resolve issues with renewals and add specs (see #1218)
- add numerous helpers for integration tests
- misc cleanup of other tests
- resolve deprecation warning reintroduced by #1081
- clean up tests from #987
- refactored the for_eq_model Reservation scope not to call .finalized
orenyk added a commit that referenced this issue Apr 24, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants