From ec00baef0d2e7637a96b3e815b5b1fd1719bf2bc Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Sun, 5 Nov 2017 14:07:33 +1300 Subject: [PATCH] Updated feature spec to look for new annual/perennial text --- spec/features/crops/crop_detail_page_spec.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/features/crops/crop_detail_page_spec.rb b/spec/features/crops/crop_detail_page_spec.rb index 4c5332c83..5f0fa2ba4 100644 --- a/spec/features/crops/crop_detail_page_spec.rb +++ b/spec/features/crops/crop_detail_page_spec.rb @@ -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