mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-02-01 05:01:04 -05:00
Updated feature spec to look for new annual/perennial text
This commit is contained in:
@@ -173,18 +173,18 @@ feature "crop detail page", js: true do
|
||||
before { visit crop_path(crop) }
|
||||
context 'crop is an annual' do
|
||||
let(:crop) { FactoryBot.create :annual_crop }
|
||||
it { expect(page).to have_text 'annual (living and reproducing in a single year or less)' }
|
||||
it { expect(page).not_to have_text 'perennial (living more than two years) ' }
|
||||
it { expect(page).to have_text 'annual crop (living and reproducing in a single year or less)' }
|
||||
it { expect(page).not_to have_text 'perennial crop (living more than two years)' }
|
||||
end
|
||||
context 'crop is perennial' do
|
||||
let(:crop) { FactoryBot.create :perennial_crop }
|
||||
it { expect(page).to have_text 'perennial (living more than two years) ' }
|
||||
it { expect(page).not_to have_text 'annual (living and reproducing in a single year or less)' }
|
||||
it { expect(page).to have_text 'perennial crop (living more than two years)' }
|
||||
it { expect(page).not_to have_text 'annual crop (living and reproducing in a single year or less)' }
|
||||
end
|
||||
context 'crop perennial value is null' do
|
||||
let(:crop) { FactoryBot.create :crop, perennial: nil }
|
||||
it { expect(page).not_to have_text 'perennial (living more than two years) ' }
|
||||
it { expect(page).not_to have_text 'annual (living and reproducing in a single year or less)' }
|
||||
it { expect(page).not_to have_text 'perennial crop (living more than two years)' }
|
||||
it { expect(page).not_to have_text 'annual crop (living and reproducing in a single year or less)' }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user