mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-18 21:56:55 -04:00
spec updates
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user