forked from rubyforgood/casa
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
created first version of court_dates_helper test
- Loading branch information
1 parent
14e0027
commit 55a106b
Showing
2 changed files
with
29 additions
and
0 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
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
require "rails_helper" | ||
|
||
RSpec.describe CourtDatesHelper do | ||
describe "#when_do_we_have_court_dates" do | ||
describe 'when casa case has only dates in the past' do | ||
let(:casa_case) { create(:casa_case, :with_past_court_date) } | ||
|
||
it "returns 'past'" do | ||
expect(helper.when_do_we_have_court_dates(casa_case)).to eq('past') | ||
end | ||
end | ||
|
||
describe 'when casa case only has dates in the future' do | ||
let(:casa_case) { create(:casa_case, :with_upcoming_court_date) } | ||
|
||
it "returns 'future'" do | ||
expect(helper.when_do_we_have_court_dates(casa_case)).to eq('future') | ||
end | ||
end | ||
|
||
it "returns nothing if the last court date is in the future and the first is in the past" do; end | ||
end | ||
end |