Conversation
These now include explicit tests for the changesets expected, as well as refactoring so that they don't rely on fixtures.
This is no longer required, as the tests no longer use fixtures.
| def test_feed | ||
| changeset = create(:changeset, :num_changes => 1) | ||
| _empty_changeset = create(:changeset, :num_changes => 0) | ||
|
|
There was a problem hiding this comment.
I think we should create a changeset that is still open here, to make sure it doesn't get included in the feed result - that was (admittedly very non-obviously) being tested before,
There was a problem hiding this comment.
I think this might be a misleading comment - the controller code doesn't appear to check for open vs closed. In fact the comment in the code suggests that it should only be /open/ changesets, which I think is a second misleading comment!
The changeset in the test here is open anyway, but I can add a closed one to test the behaviour.
Do you think I should update both comments to simply reference "changesets" rather than open or closed?
There was a problem hiding this comment.
Ah yes you're right... I misread the code in check_feed_result and thought it as filtering out open changesets.
There was a problem hiding this comment.
Updating the comments sounds good though as they are very misleading.
This PR removes the test fixtures, and associated helper methods. It also fixes some tests that were implicitly relying on the test fixtures being in the database.