more spec updates

This commit is contained in:
Brenda Wallace
2019-06-25 20:31:15 +12:00
parent 72a0c07a93
commit 20e236fb4b
3 changed files with 7 additions and 7 deletions

View File

@@ -11,12 +11,12 @@ describe 'home/_members.html.haml', type: "view" do
end
it 'Has a heading' do
rendered.should have_content "Some of our members"
expect(rendered).to have_content "Some of our members"
end
it 'Shows members' do
rendered.should have_content @member.login_name
rendered.should have_content @member.location
rendered.should have_content @planting.crop_name
describe 'Shows members' do
it { expect(rendered).to have_content @member.login_name }
it { expect(rendered).to have_content @member.location }
it { expect(rendered).to have_content @planting.crop_name }
end
end

View File

@@ -14,6 +14,7 @@ describe "plantings/_form" do
owner: @member,
planted_at: Date.new(2013, 3, 1))
@gardens = @member.gardens
sign_in @member
render
end

View File

@@ -20,8 +20,7 @@ describe "posts/index" do
it "renders a list of posts" do
assert_select "div.post", count: 2
assert_select "h3", text: "A Post".to_s, count: 2
assert_select "div.post-body",
text: "This is some text.".to_s, count: 2
assert_select "div.post-body", text: "This is some text.".to_s, count: 2
end
it "contains two gravatar icons" do