mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-13 18:55:45 -04:00
Merge branch 'dev' into awesomecode-rspec/multiplesubjects-7391
This commit is contained in:
@@ -45,7 +45,7 @@ feature "Alternate names", js: true do
|
||||
href: alternate_name_path(alternate_eggplant)
|
||||
within('.alternate_names') { click_on "Delete" }
|
||||
expect(page.status_code).to equal 200
|
||||
expect(page).to_not have_content alternate_eggplant.name
|
||||
expect(page).not_to have_content alternate_eggplant.name
|
||||
expect(page).to have_content 'Alternate name was successfully deleted'
|
||||
end
|
||||
|
||||
|
||||
@@ -147,9 +147,9 @@ feature "crop detail page", js: true do
|
||||
|
||||
scenario "User not signed in" do
|
||||
visit crop_path(seed.crop)
|
||||
expect(page).to_not have_content "You have 20 seeds of this crop"
|
||||
expect(page).to_not have_content "You don't have any seeds of this crop"
|
||||
expect(page).to_not have_link "View your seeds"
|
||||
expect(page).not_to have_content "You have 20 seeds of this crop"
|
||||
expect(page).not_to have_content "You don't have any seeds of this crop"
|
||||
expect(page).not_to have_link "View your seeds"
|
||||
end
|
||||
|
||||
scenario "User signed in" do
|
||||
|
||||
@@ -6,8 +6,8 @@ feature "follows", :js do
|
||||
|
||||
scenario "follow buttons on member profile page" do
|
||||
visit member_path(member)
|
||||
expect(page).to_not have_link "Follow"
|
||||
expect(page).to_not have_link "Unfollow"
|
||||
expect(page).not_to have_link "Follow"
|
||||
expect(page).not_to have_link "Unfollow"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -125,8 +125,8 @@ feature "member profile", js: true do
|
||||
|
||||
scenario "ordinary user's page" do
|
||||
visit member_path(other_member)
|
||||
expect(page).to_not have_text "Crop Wrangler"
|
||||
expect(page).to_not have_text "Admin"
|
||||
expect(page).not_to have_text "Crop Wrangler"
|
||||
expect(page).not_to have_text "Admin"
|
||||
end
|
||||
|
||||
context "your own profile page" do
|
||||
@@ -163,7 +163,7 @@ feature "member profile", js: true do
|
||||
end
|
||||
|
||||
scenario "does not have a button to edit profile" do
|
||||
expect(page).to_not have_link "Edit profile", href: edit_member_registration_path
|
||||
expect(page).not_to have_link "Edit profile", href: edit_member_registration_path
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -13,7 +13,7 @@ feature "User searches" do
|
||||
expect(page).to have_content "community near Philippines"
|
||||
expect(page).to have_button "search_button"
|
||||
expect(page).to have_content "Nearby members"
|
||||
expect(page).to_not have_content "No results found"
|
||||
expect(page).not_to have_content "No results found"
|
||||
end
|
||||
|
||||
scenario "with a blank search string" do
|
||||
|
||||
@@ -110,8 +110,8 @@ feature "Planting a crop", :js, :elasticsearch do
|
||||
end
|
||||
|
||||
expect(page).to have_content "planting was successfully created"
|
||||
expect(page).to_not have_content "Progress: 0% - not planted yet"
|
||||
expect(page).to_not have_content "Not enough data"
|
||||
expect(page).not_to have_content "Progress: 0% - not planted yet"
|
||||
expect(page).not_to have_content "Not enough data"
|
||||
end
|
||||
|
||||
it "should show that planting is 100% complete (no date specified)" do
|
||||
@@ -178,7 +178,7 @@ feature "Planting a crop", :js, :elasticsearch do
|
||||
fill_in "Finished date", with: "2015-06-25"
|
||||
click_button "Save"
|
||||
expect(page).to have_content "planting was successfully updated"
|
||||
expect(page).to_not have_content "Progress: Not enough data"
|
||||
expect(page).not_to have_content "Progress: Not enough data"
|
||||
end
|
||||
|
||||
scenario "Marking a planting as finished" do
|
||||
|
||||
@@ -45,7 +45,7 @@ feature "Scientific names", js: true do
|
||||
href: scientific_name_path(zea_mays)
|
||||
within('.scientific_names') { click_on "Delete" }
|
||||
expect(page.status_code).to equal 200
|
||||
expect(page).to_not have_content zea_mays.name
|
||||
expect(page).not_to have_content zea_mays.name
|
||||
expect(page).to have_content 'Scientific name was successfully deleted.'
|
||||
end
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@ shared_examples "crop suggest" do |resource|
|
||||
fill_autocomplete "crop", with: "pe"
|
||||
end
|
||||
|
||||
expect(page).to_not have_content("pear")
|
||||
expect(page).to_not have_content("pea")
|
||||
expect(page).not_to have_content("pear")
|
||||
expect(page).not_to have_content("pea")
|
||||
|
||||
within "form#new_#{resource}" do
|
||||
fill_autocomplete "crop", with: "pea"
|
||||
|
||||
@@ -553,7 +553,7 @@ describe Crop do
|
||||
end
|
||||
|
||||
it "should not delete the posts" do
|
||||
expect(Post.find(post.id)).to_not eq nil
|
||||
expect(Post.find(post.id)).not_to eq nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -26,31 +26,31 @@ describe 'like' do
|
||||
it 'is invalid without a member' do
|
||||
like = Like.new
|
||||
like.likeable = post
|
||||
expect(like).to_not be_valid
|
||||
expect(like).not_to be_valid
|
||||
end
|
||||
|
||||
it 'is invalid without a likeable item' do
|
||||
like = Like.new
|
||||
like.member = member
|
||||
expect(like).to_not be_valid
|
||||
expect(like).not_to be_valid
|
||||
end
|
||||
end
|
||||
|
||||
it 'does not allow duplicate likes by the same member' do
|
||||
Like.create(member: member, likeable: post)
|
||||
second_like = Like.new(member: member, likeable: post)
|
||||
expect(second_like).to_not be_valid
|
||||
expect(second_like).not_to be_valid
|
||||
end
|
||||
|
||||
it 'destroys like if post no longer exists' do
|
||||
like = Like.create(member: member, likeable: post)
|
||||
post.destroy
|
||||
expect(Like.all).to_not include like
|
||||
expect(Like.all).not_to include like
|
||||
end
|
||||
|
||||
it 'destroys like if member no longer exists' do
|
||||
like = Like.create(member: member, likeable: post)
|
||||
member.destroy
|
||||
expect(Like.all).to_not include like
|
||||
expect(Like.all).not_to include like
|
||||
end
|
||||
end
|
||||
|
||||
@@ -165,8 +165,8 @@ describe Post do
|
||||
end
|
||||
|
||||
it "should not delete the crops" do
|
||||
expect(Crop.find(tomato.id)).to_not eq nil
|
||||
expect(Crop.find(maize.id)).to_not eq nil
|
||||
expect(Crop.find(tomato.id)).not_to eq nil
|
||||
expect(Crop.find(maize.id)).not_to eq nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user