Skip to content

Commit

Permalink
additional test for coveralls failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Janell-Huyck committed Feb 21, 2024
1 parent 0940fc3 commit 8e21876
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,22 @@
end
end

context 'when there are multiple authors' do
context 'when there are two authors' do
let(:publication) { double(author_first_name: %w[John Jane], author_last_name: %w[Doe Roe]) }

it 'returns all authors in citation format' do
expect(helper.author_citation(publication)).to eq('Doe, John and Jane Roe')
end
end

context 'when there are more than two authors' do
let(:publication) { double(author_first_name: %w[John Jane Mary Jo], author_last_name: %w[Doe Roe Wallace Smith]) }

it 'returns all authors in citation format' do
expect(helper.author_citation(publication)).to eq('Doe, John, Roe, Jane, Wallace, Mary and Jo Smith')
end
end

context 'when publication is nil' do
it 'returns an empty string' do
expect(helper.author_citation(nil)).to eq('')
Expand Down

0 comments on commit 8e21876

Please sign in to comment.