-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from sandbergja/distinct_employers
Don't duplicate employers in the employer listings, helps with #63
- Loading branch information
Showing
2 changed files
with
6 additions
and
2 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 |
---|---|---|
@@ -1,5 +1,9 @@ | ||
require 'rails_helper' | ||
|
||
RSpec.describe Employer, type: :model do | ||
pending "add some examples to (or delete) #{__FILE__}" | ||
it 'uses distinct when listing employers' do | ||
employer = described_class.create name: 'The Library' | ||
(1..5).each { |job| Job.create employer: employer, title: job, description: job, job_type: job, published: true } | ||
expect(described_class.with_published_jobs.count).to eq(1) | ||
end | ||
end |