mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-02-02 13:41:00 -05:00
write 'crop_wrangling_button_spec.rb', fix previous issue
This commit is contained in:
@@ -52,4 +52,4 @@ submit the change with your pull request.
|
||||
- Kevin Yang / [kevieyang](https://github.com/kevieyang)
|
||||
- Justin Hamman / [juzham](https://github.com/juzham)
|
||||
- Rocky Jaiswal / [rocky-jaiswal](https://github.com/rocky-jaiswal)
|
||||
|
||||
- Robert Landreaux / [robertlandreaux](https://github.com/robertlandreaux)
|
||||
|
||||
56
spec/features/crops/crop_wrangling_button_spec.rb
Normal file
56
spec/features/crops/crop_wrangling_button_spec.rb
Normal file
@@ -0,0 +1,56 @@
|
||||
require 'rails_helper'
|
||||
|
||||
feature "crop wrangling button" do
|
||||
|
||||
let(:crop_wrangler_member) { FactoryGirl.create(:crop_wrangler_member) }
|
||||
|
||||
context "crop wrangling button" do
|
||||
|
||||
background do
|
||||
login_as(:crop_wrangler_member)
|
||||
end
|
||||
|
||||
background do
|
||||
visit crops_path
|
||||
end
|
||||
|
||||
scenario "has a link to crop wrangling page" do
|
||||
expect(page).to have_link "Wrangle Crops", wrangle_crops_path
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
let(:admin_member) { FactoryGirl.create(:admin_member) }
|
||||
|
||||
context "crop wrangling button" do
|
||||
|
||||
background do
|
||||
login_as(:admin_member)
|
||||
end
|
||||
|
||||
background do
|
||||
visit crops_path
|
||||
end
|
||||
|
||||
scenario "has a link to crop wrangling page" do
|
||||
expect(page).to have_link "Wrangle Crops", wrangle_crops_path
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
let(:member) { FactoryGirl.create(:member) }
|
||||
|
||||
context "crop wrangling button" do
|
||||
|
||||
background do
|
||||
login_as(:member)
|
||||
end
|
||||
|
||||
background do
|
||||
visit crops_path
|
||||
end
|
||||
|
||||
scenario "has no link to crop wrangling page"
|
||||
expect(page).to have_no_link "Wrangle Crops", wrangle_crops_path
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user