write 'crop_wrangling_button_spec.rb', fix previous issue

This commit is contained in:
Robert Landreaux
2015-01-18 23:25:38 -05:00
parent 760e5ca74e
commit e4072fb395
2 changed files with 57 additions and 1 deletions

View File

@@ -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)

View 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