spec updates

This commit is contained in:
Brenda Wallace
2019-06-24 18:06:32 +12:00
parent fcf4e0f15d
commit cafc514ee5
3 changed files with 10 additions and 9 deletions

View File

@@ -16,10 +16,7 @@ describe "crop detail page", js: true do
context "varieties" do
it "The crop DOES NOT have varieties" do
visit crop_path(crop)
within ".varieties" do
expect(page).not_to have_text 'tomato'
end
expect(page).not_to have_text 'Varieties'
end
end

View File

@@ -107,7 +107,11 @@ describe "Planting a crop", js: true do
describe "Making a planting inactive from garden show" do
let(:path) { garden_path garden }
let(:link_text) { "Mark as finished" }
before do
within '.planting-quick-actions' do
click_link(aclass: 'planting-menu')
end
end
it_behaves_like "append date"
end

View File

@@ -11,15 +11,15 @@ describe "comments/new" do
end
it "shows the text of the post under discussion" do
rendered.should have_content @post.body
expect(rendered).to have_content @post.body
end
it "shows previous comments" do
rendered.should have_content @comment.body
expect(rendered).to have_content @comment.body
end
it "shows the correct comment count" do
rendered.should have_content "1 comment"
expect(rendered).to have_content "1 comment"
end
it "renders new comment form" do
@@ -29,6 +29,6 @@ describe "comments/new" do
end
it 'shows markdown help' do
rendered.should have_content 'Markdown'
expect(rendered).to have_content 'Markdown'
end
end