-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- One lint (RSpec/SubjectStub) is disabled in two classes rather than being fixed, because fixing it really requires a rethink about the actual classes, and this set of commits is scoped to just making the lint pass. We should revisit how these two classes work later (especially the call out to mtime in ics_renderer)
- Loading branch information
Showing
9 changed files
with
121 additions
and
135 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
RSpec.describe ApiErrorRoutingConstraint do | ||
include ContentStoreHelpers | ||
|
||
let(:subject) { described_class.new } | ||
let(:request) { double(path: "/slug", env: {}) } | ||
subject(:api_error_routing_constraint) { described_class.new } | ||
|
||
let(:request) { instance_double(ActionDispatch::Request, path: "/slug", env: {}) } | ||
|
||
it "returns true if there's a cached error" do | ||
stub_content_store_does_not_have_item("/slug") | ||
|
||
expect(subject.matches?(request)).to be true | ||
expect(api_error_routing_constraint.matches?(request)).to be true | ||
end | ||
|
||
it "returns false if there was no error in API calls" do | ||
stub_content_store_has_item("/slug") | ||
|
||
expect(subject.matches?(request)).to be false | ||
expect(api_error_routing_constraint.matches?(request)).to be false | ||
end | ||
end |
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
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
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
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
Oops, something went wrong.