samvera / questioning_authority

Question your authorities
Other
54 stars 30 forks source link

Refactor the RSpec test suites #267

Open jrgriffiniii opened 4 years ago

jrgriffiniii commented 4 years ago

While resolving https://github.com/samvera/questioning_authority/issues/260, @elrayle noted that it would be desirable to refactor at least some of the existing tests in order to address the following:

When first written, they were written very specific to the authorities that are configured in QA. But now there are a lot of configs available the vast majority of which are not delivered with QA. But they are all expected to be able to work. It is on my TODO list to go through these tests and make them

  • easier to read
  • less dependent on OCLC/LOC (a lot of duplication in the tests by checking the same thing for both authorities)
  • clean up the fixture authorities in favor of doing more stubbing
  • move tests to the lowest place they can be tested (right now the controller is doing most of the testing instead of the classes that actually create the responses)

I apologize should this issue constitute an epic one, and require further derivative issues in order to render these tasks actionable.

elrayle commented 4 years ago

Thanks for summarizing our discussions so the intention to refactor doesn't get lost.