mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-25 09:19:15 -04:00
Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6663f3ade4 | ||
|
|
451030761d | ||
|
|
d4e4ca6519 | ||
|
|
284f0cddcd | ||
|
|
4ced7ee7e9 | ||
|
|
b60510e016 | ||
|
|
e85daa405b | ||
|
|
9ab83f7bbc | ||
|
|
329e0106bb | ||
|
|
4743fc7a63 | ||
|
|
c66a5b12a5 | ||
|
|
f98bb32612 | ||
|
|
771443ee85 | ||
|
|
1322ebd8e3 | ||
|
|
9e98db423e | ||
|
|
305702f644 | ||
|
|
1f4f806bb0 | ||
|
|
6a17ba547f | ||
|
|
3ffdc61428 | ||
|
|
bb6e9e32e6 |
@@ -85,7 +85,7 @@ GEM
|
||||
uniform_notifier (~> 1.10.0)
|
||||
byebug (9.1.0)
|
||||
cancancan (2.1.1)
|
||||
capybara (2.16.0)
|
||||
capybara (2.16.1)
|
||||
addressable
|
||||
mini_mime (>= 0.1.3)
|
||||
nokogiri (>= 1.3.3)
|
||||
@@ -423,7 +423,7 @@ GEM
|
||||
thor (>= 0.18.1, < 2.0)
|
||||
rainbow (2.1.0)
|
||||
raindrops (0.19.0)
|
||||
rake (12.2.1)
|
||||
rake (12.3.0)
|
||||
rb-fsevent (0.10.2)
|
||||
rb-inotify (0.9.10)
|
||||
ffi (>= 0.5.0, < 2)
|
||||
@@ -447,7 +447,7 @@ GEM
|
||||
rspec-mocks (3.7.0)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.7.0)
|
||||
rspec-rails (3.7.1)
|
||||
rspec-rails (3.7.2)
|
||||
actionpack (>= 3.0)
|
||||
activesupport (>= 3.0)
|
||||
railties (>= 3.0)
|
||||
@@ -630,6 +630,7 @@ DEPENDENCIES
|
||||
will_paginate
|
||||
xmlrpc
|
||||
|
||||
|
||||
RUBY VERSION
|
||||
ruby 2.4.1p111
|
||||
|
||||
|
||||
@@ -17,10 +17,10 @@ class PhotosController < ApplicationController
|
||||
end
|
||||
|
||||
def new
|
||||
@type = params[:type]
|
||||
@id = params[:id]
|
||||
|
||||
@photo = Photo.new
|
||||
@item = item_to_link_to
|
||||
@type = item_type
|
||||
@id = item_id
|
||||
retrieve_from_flickr
|
||||
respond_with @photo
|
||||
end
|
||||
@@ -30,9 +30,13 @@ class PhotosController < ApplicationController
|
||||
end
|
||||
|
||||
def create
|
||||
find_or_create_photo_from_flickr_photo
|
||||
add_photo_to_collection
|
||||
@photo.save if @photo.present?
|
||||
ActiveRecord::Base.transaction do
|
||||
@photo = find_or_create_photo_from_flickr_photo
|
||||
@item = item_to_link_to
|
||||
raise "Could not find this #{type} owned by you" unless @item
|
||||
collection << @item unless collection.include?(@item)
|
||||
@photo.save! if @photo.present?
|
||||
end
|
||||
respond_with @photo
|
||||
end
|
||||
|
||||
@@ -48,8 +52,14 @@ class PhotosController < ApplicationController
|
||||
|
||||
private
|
||||
|
||||
def item_id?
|
||||
params.key? :id
|
||||
#
|
||||
# Params
|
||||
def item_id
|
||||
params[:id]
|
||||
end
|
||||
|
||||
def item_type
|
||||
params[:type]
|
||||
end
|
||||
|
||||
def flickr_photo_id_param
|
||||
@@ -61,26 +71,32 @@ class PhotosController < ApplicationController
|
||||
:license_url, :thumbnail_url, :fullsize_url, :link_url)
|
||||
end
|
||||
|
||||
def find_or_create_photo_from_flickr_photo
|
||||
@photo = Photo.find_by(flickr_photo_id: flickr_photo_id_param)
|
||||
@photo = Photo.new(photo_params) unless @photo
|
||||
@photo.owner_id = current_member.id
|
||||
@photo.set_flickr_metadata
|
||||
@photo
|
||||
# Item with photos attached
|
||||
#
|
||||
def item_to_link_to
|
||||
raise "No item id provided" if item_id.nil?
|
||||
raise "No item type provided" if item_type.nil?
|
||||
raise "Missing or invalid type provided" unless photos_supported_on_type?(item_type)
|
||||
item_class = Growstuff::Constants::PhotoModels.get_item(item_type)
|
||||
item_class.find_by!(id: params[:id], owner_id: current_member.id)
|
||||
end
|
||||
|
||||
def add_photo_to_collection
|
||||
raise "Missing or invalid type provided" unless Growstuff::Constants::PhotoModels.types.include?(params[:type])
|
||||
raise "No item id provided" unless item_id?
|
||||
collection = Growstuff::Constants::PhotoModels.get_relation(@photo, params[:type])
|
||||
def collection
|
||||
Growstuff::Constants::PhotoModels.get_relation(@photo, item_type)
|
||||
end
|
||||
|
||||
item_class = Growstuff::Constants::PhotoModels.get_item(params[:type])
|
||||
item = item_class.find_by!(id: params[:id], owner_id: current_member.id)
|
||||
raise "Could not find this item owned by you" unless item
|
||||
def photos_supported_on_type?(_type)
|
||||
Growstuff::Constants::PhotoModels.types.include?(item_type)
|
||||
end
|
||||
|
||||
collection << item unless collection.include?(item)
|
||||
rescue => e
|
||||
flash[:alert] = e.message
|
||||
#
|
||||
# Flickr retrieval
|
||||
def find_or_create_photo_from_flickr_photo
|
||||
photo = Photo.find_by(flickr_photo_id: flickr_photo_id_param)
|
||||
photo ||= Photo.new(photo_params)
|
||||
photo.owner_id = current_member.id
|
||||
photo.set_flickr_metadata
|
||||
photo
|
||||
end
|
||||
|
||||
def retrieve_from_flickr
|
||||
|
||||
@@ -21,3 +21,8 @@
|
||||
class: 'btn btn-default', id: 'delete_garden_link' do
|
||||
%span.glyphicon.glyphicon-trash{ title: "Delete" }
|
||||
Delete
|
||||
- if can?(:edit, garden) && can?(:create, Photo)
|
||||
= link_to new_photo_path(type: "garden", id: garden.id),
|
||||
class: 'btn btn-primary' do
|
||||
%span.glyphicon.glyphicon-camera{ title: "Add Photo" }
|
||||
Add Photo
|
||||
|
||||
@@ -91,8 +91,8 @@
|
||||
%p
|
||||
= link_to new_photo_path(type: "garden", id: @garden.id),
|
||||
class: 'btn btn-primary' do
|
||||
%span.glyphicon.glyphicon-camera{ title: "Add Photo" }
|
||||
Add Photo
|
||||
%span.glyphicon.glyphicon-camera{ title: "Add photo" }
|
||||
Add photo
|
||||
- if @garden.photos.size.positive?
|
||||
%h3= localize_plural(@garden.photos, Photo)
|
||||
.row
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
- content_for :title, "New Photo"
|
||||
|
||||
%h3
|
||||
Choose photo for
|
||||
= @item
|
||||
|
||||
- if @flickr_auth
|
||||
%p
|
||||
Connected to Flickr as
|
||||
|
||||
@@ -1,16 +1,27 @@
|
||||
- if can?(:edit, planting) || can?(:destroy, planting)
|
||||
- if can? :edit, planting
|
||||
= link_to edit_planting_path(planting), class: 'btn btn-default btn-xs' do
|
||||
%span.glyphicon.glyphicon-pencil{ title: "Edit garden" }
|
||||
%span.glyphicon.glyphicon-pencil{ title: "Edit" }
|
||||
Edit
|
||||
- if can? :destroy, planting
|
||||
= link_to planting, method: :delete,
|
||||
data: { confirm: 'Are you sure?' },
|
||||
class: 'btn btn-default btn-xs' do
|
||||
data: { confirm: 'Are you sure?' }, class: 'btn btn-default btn-xs' do
|
||||
%span.glyphicon.glyphicon-trash{ title: "Delete" }
|
||||
Delete
|
||||
|
||||
- unless planting.finished
|
||||
= link_to "Mark as finished", planting_path(planting, planting: { finished: 1 }),
|
||||
method: :put, class: 'btn btn-default btn-xs append-date'
|
||||
- if can? :create, Harvest
|
||||
= link_to 'Harvest', new_planting_harvest_path(planting), class: 'btn btn-default btn-xs'
|
||||
= link_to planting_path(planting, planting: { finished: 1 }),
|
||||
method: :put, class: 'btn btn-default btn-xs append-date' do
|
||||
|
||||
%span.glyphicon.glyphicon-ok{ title: "Finished" }
|
||||
Mark as finished
|
||||
|
||||
- if can?(:create, Harvest)
|
||||
= link_to new_planting_harvest_path(planting), class: 'btn btn-default btn-xs' do
|
||||
%span.glyphicon.glyphicon-leaf{ title: "Harvest" }
|
||||
Harvest
|
||||
|
||||
- if can?(:edit, planting) && can?(:create, Photo)
|
||||
= link_to new_photo_path(id: planting.id, type: 'planting'), class: 'btn btn-default btn-xs' do
|
||||
%span.glyphicon.glyphicon-camera{ title: "Add photo" }
|
||||
Add photo
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe AccountTypesController do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe AccountsController do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe Admin::OrdersController do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe AdminController do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe AuthenticationsController do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe CommentsController do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe CropsController do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe ForumsController do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe GardensController, type: :controller do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe HarvestsController do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe HomeController do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe MembersController do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe NotificationsController do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe OrderItemsController do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe OrdersController do
|
||||
|
||||
@@ -1,15 +1,4 @@
|
||||
# frozen_string_literal: true
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
@@ -34,45 +23,38 @@ describe PhotosController do
|
||||
end
|
||||
|
||||
describe "GET new" do
|
||||
let(:tomato) { FactoryBot.create(:tomato) }
|
||||
let(:planting) { FactoryBot.create(:planting, crop: tomato, owner: member) }
|
||||
let(:garden) { FactoryBot.create(:garden, owner: member) }
|
||||
let(:harvest) { FactoryBot.create(:harvest, owner: member) }
|
||||
let(:member) { FactoryBot.create(:member) }
|
||||
let!(:auth) { FactoryBot.create(:flickr_authentication, member: member) }
|
||||
|
||||
before(:each) do
|
||||
@member = FactoryBot.create(:member)
|
||||
sign_in @member
|
||||
@member.stub(:flickr_photos) { [[], 0] }
|
||||
@member.stub(:flickr_sets) { { "foo" => "bar" } }
|
||||
controller.stub(:current_member) { @member }
|
||||
sign_in member
|
||||
member.stub(:flickr_photos) { [[], 0] }
|
||||
member.stub(:flickr_sets) { { "foo" => "bar" } }
|
||||
controller.stub(:current_member) { member }
|
||||
end
|
||||
|
||||
it "assigns the flickr auth as @flickr_auth" do
|
||||
@auth = FactoryBot.create(:flickr_authentication, member: @member)
|
||||
get :new, {}
|
||||
assigns(:flickr_auth).should be_an_instance_of(Authentication)
|
||||
describe "planting photos" do
|
||||
before(:each) { get :new, type: "planting", id: planting.id }
|
||||
it { assigns(:flickr_auth).should be_an_instance_of(Authentication) }
|
||||
it { assigns(:item).should eq planting }
|
||||
it { expect(flash[:alert]).not_to be_present }
|
||||
it { expect(flash[:alert]).not_to be_present }
|
||||
end
|
||||
|
||||
it "assigns a planting id" do
|
||||
get :new, type: "planting", id: 5
|
||||
assigns(:id).should eq "5"
|
||||
assigns(:type).should eq "planting"
|
||||
expect(flash[:alert]).not_to be_present
|
||||
describe "harvest photos" do
|
||||
before { get :new, type: "harvest", id: harvest.id }
|
||||
it { assigns(:item).should eq harvest }
|
||||
it { expect(flash[:alert]).not_to be_present }
|
||||
end
|
||||
|
||||
it "assigns a harvest id" do
|
||||
get :new, type: "harvest", id: 5
|
||||
assigns(:id).should eq "5"
|
||||
assigns(:type).should eq "harvest"
|
||||
expect(flash[:alert]).not_to be_present
|
||||
end
|
||||
|
||||
it "assigns a garden id" do
|
||||
get :new, type: "garden", id: 5
|
||||
assigns(:id).should eq "5"
|
||||
assigns(:type).should eq "garden"
|
||||
expect(flash[:alert]).not_to be_present
|
||||
end
|
||||
|
||||
it "assigns the current set as @current_set" do
|
||||
get :new, set: 'foo'
|
||||
assigns(:current_set).should eq "foo"
|
||||
expect(flash[:alert]).not_to be_present
|
||||
describe "garden photos" do
|
||||
before { get :new, type: "garden", id: garden.id }
|
||||
it { assigns(:item).should eq garden }
|
||||
it { expect(flash[:alert]).not_to be_present }
|
||||
end
|
||||
end
|
||||
|
||||
@@ -99,11 +81,13 @@ describe PhotosController do
|
||||
Photo.last.plantings.first.should eq planting
|
||||
end
|
||||
|
||||
it "doesn't attach a photo to a planting twice" do
|
||||
post :create, photo: { flickr_photo_id: photo.flickr_photo_id }, type: "planting", id: planting.id
|
||||
post :create, photo: { flickr_photo_id: photo.flickr_photo_id }, type: "planting", id: planting.id
|
||||
expect(flash[:alert]).not_to be_present
|
||||
Photo.last.plantings.size.should eq 1
|
||||
describe "doesn't attach a photo to a planting twice" do
|
||||
before do
|
||||
post :create, photo: { flickr_photo_id: photo.flickr_photo_id }, type: "planting", id: planting.id
|
||||
post :create, photo: { flickr_photo_id: photo.flickr_photo_id }, type: "planting", id: planting.id
|
||||
end
|
||||
it { expect(flash[:alert]).not_to be_present }
|
||||
it { expect(Photo.last.plantings.size).to eq 1 }
|
||||
end
|
||||
|
||||
it "attaches the photo to a harvest" do
|
||||
@@ -121,18 +105,20 @@ describe PhotosController do
|
||||
|
||||
it "doesn't attach photo to a comment" do
|
||||
comment = FactoryBot.create(:comment)
|
||||
post :create, photo: { flickr_photo_id: photo.flickr_photo_id }, type: "comment", id: comment.id
|
||||
expect(flash[:alert]).to be_present
|
||||
expect do
|
||||
post :create, photo: { flickr_photo_id: photo.flickr_photo_id }, type: "comment", id: comment.id
|
||||
end.to raise_error
|
||||
end
|
||||
end
|
||||
|
||||
describe "for the second time" do
|
||||
let(:planting) { FactoryBot.create :planting, owner: member }
|
||||
it "does not add a photo twice" do
|
||||
expect do
|
||||
post :create, photo: { flickr_photo_id: 1 }
|
||||
post :create, photo: { flickr_photo_id: 1 }, id: planting.id, type: 'planting'
|
||||
end.to change(Photo, :count).by(1)
|
||||
expect do
|
||||
post :create, photo: { flickr_photo_id: 1 }
|
||||
post :create, photo: { flickr_photo_id: 1 }, id: planting.id, type: 'planting'
|
||||
end.to change(Photo, :count).by(0)
|
||||
end
|
||||
end
|
||||
@@ -159,16 +145,18 @@ describe PhotosController do
|
||||
it "does not create the planting/photo link" do
|
||||
# members will be auto-created, and different
|
||||
another_planting = FactoryBot.create(:planting)
|
||||
post :create, photo: { flickr_photo_id: photo.flickr_photo_id }, type: "planting", id: another_planting.id
|
||||
expect(flash[:alert]).to be_present
|
||||
expect do
|
||||
post :create, photo: { flickr_photo_id: photo.flickr_photo_id }, type: "planting", id: another_planting.id
|
||||
end.to raise_error(ActiveRecord::RecordNotFound)
|
||||
Photo.last.plantings.first.should_not eq another_planting
|
||||
end
|
||||
|
||||
it "does not create the harvest/photo link" do
|
||||
# members will be auto-created, and different
|
||||
another_harvest = FactoryBot.create(:harvest)
|
||||
post :create, photo: { flickr_photo_id: photo.flickr_photo_id }, type: "harvest", id: another_harvest.id
|
||||
expect(flash[:alert]).to be_present
|
||||
expect do
|
||||
post :create, photo: { flickr_photo_id: photo.flickr_photo_id }, type: "harvest", id: another_harvest.id
|
||||
end.to raise_error(ActiveRecord::RecordNotFound)
|
||||
Photo.last.harvests.first.should_not eq another_harvest
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe PlacesController do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe PlantPartsController do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe PlantingsController do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe PostsController do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe ProductsController do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe RegistrationsController do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe RolesController do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe ScientificNamesController do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe SeedsController do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe ShopController do
|
||||
|
||||
70
spec/features/gardens/gardens_index_spec.rb
Normal file
70
spec/features/gardens/gardens_index_spec.rb
Normal file
@@ -0,0 +1,70 @@
|
||||
require 'rails_helper'
|
||||
require 'custom_matchers'
|
||||
|
||||
feature "Gardens#index", :js do
|
||||
context "Logged in as member" do
|
||||
let(:member) { FactoryBot.create :member }
|
||||
|
||||
background { login_as member }
|
||||
|
||||
context "with 10 gardens" do
|
||||
before do
|
||||
FactoryBot.create_list :garden, 10, owner: member
|
||||
visit gardens_path(member: member)
|
||||
end
|
||||
|
||||
it "displays each of the gardens" do
|
||||
member.gardens.each do |garden|
|
||||
expect(page).to have_text garden.name
|
||||
end
|
||||
end
|
||||
it "links to each garden" do
|
||||
member.gardens.each do |garden|
|
||||
expect(page).to have_link(garden.name, href: garden_path(garden))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "with inactive gardens" do
|
||||
let!(:active_garden) { FactoryBot.create :garden, name: "My active garden", owner: member }
|
||||
let!(:inactive_garden) { FactoryBot.create :inactive_garden, name: "retired garden", owner: member }
|
||||
|
||||
before { visit gardens_path(member: member) }
|
||||
|
||||
it "show active garden" do
|
||||
expect(page).to have_text active_garden.name
|
||||
end
|
||||
it "should not show inactive garden" do
|
||||
expect(page).not_to have_text inactive_garden.name
|
||||
end
|
||||
it "links to active garden" do
|
||||
expect(page).to have_link(active_garden.name, href: garden_path(active_garden))
|
||||
end
|
||||
it "does not link to inactive gardens" do
|
||||
expect(page).not_to have_link(inactive_garden.name, href: garden_path(inactive_garden))
|
||||
end
|
||||
end
|
||||
|
||||
context 'with plantings' do
|
||||
let(:maize) { FactoryBot.create(:maize) }
|
||||
let(:tomato) { FactoryBot.create(:tomato) }
|
||||
|
||||
let!(:planting) do
|
||||
FactoryBot.create :planting, owner: member, crop: maize, garden: member.gardens.first
|
||||
end
|
||||
let!(:finished_planting) do
|
||||
FactoryBot.create :finished_planting, owner: member, crop: tomato, garden: member.gardens.first
|
||||
end
|
||||
|
||||
before do
|
||||
visit gardens_path(member: member)
|
||||
end
|
||||
it "shows planting in garden" do
|
||||
expect(page).to have_link(planting.crop.name, href: planting_path(planting))
|
||||
end
|
||||
it "does not show finished planting" do
|
||||
expect(page).not_to have_text(finished_planting.crop.name)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
51
spec/features/photos/new_photo_spec.rb
Normal file
51
spec/features/photos/new_photo_spec.rb
Normal file
@@ -0,0 +1,51 @@
|
||||
require 'rails_helper'
|
||||
|
||||
feature "new photo page" do
|
||||
let(:photo) { FactoryBot.create :photo }
|
||||
|
||||
context "signed in member" do
|
||||
let(:member) { FactoryBot.create :member }
|
||||
|
||||
background { login_as member }
|
||||
|
||||
context "viewing a planting" do
|
||||
let(:planting) { FactoryBot.create :planting, owner: member }
|
||||
|
||||
scenario "add photo" do
|
||||
visit planting_path(planting)
|
||||
click_link('Add photo', match: :first)
|
||||
expect(page).to have_text planting.crop.name
|
||||
end
|
||||
end
|
||||
|
||||
context "viewing a harvest" do
|
||||
let(:harvest) { FactoryBot.create :harvest, owner: member }
|
||||
|
||||
scenario "add photo" do
|
||||
visit harvest_path(harvest)
|
||||
click_link "Add photo"
|
||||
expect(page).to have_text harvest.crop.name
|
||||
end
|
||||
end
|
||||
|
||||
context "viewing a garden" do
|
||||
let(:garden) { FactoryBot.create :garden, owner: member }
|
||||
|
||||
scenario "add photo" do
|
||||
visit garden_path(garden)
|
||||
click_link "Add photo"
|
||||
expect(page).to have_text garden.name
|
||||
end
|
||||
end
|
||||
|
||||
pending "viewing a seed" do
|
||||
let(:seed) { FactoryBot.create :seed, owner: member }
|
||||
|
||||
scenario "add photo" do
|
||||
visit seed_path(seed)
|
||||
click_link "Add photo"
|
||||
expect(page).to have_text seed.to_s
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -13,17 +13,37 @@ feature "signout" do
|
||||
expect(current_path).to eq crops_path
|
||||
end
|
||||
|
||||
scenario "after signout, redirect to signin page if page needs authentication" do
|
||||
models = %w[plantings harvests posts photos gardens seeds]
|
||||
models.each do |model|
|
||||
visit "/#{model}/new"
|
||||
shared_examples "sign-in redirects" do |path|
|
||||
scenario "after signout, redirect to signin page if page needs authentication" do
|
||||
visit path
|
||||
expect(current_path).to eq new_member_session_path
|
||||
expect(page).to have_http_status(200)
|
||||
fill_in 'Login', with: member.login_name
|
||||
fill_in 'Password', with: member.password
|
||||
click_button 'Sign in'
|
||||
expect(current_path).to eq "/#{model}/new"
|
||||
expect(page).to have_http_status(200)
|
||||
expect(current_path).to eq path
|
||||
click_link 'Sign out'
|
||||
expect(page).to have_http_status(200)
|
||||
expect(current_path).to eq new_member_session_path
|
||||
end
|
||||
end
|
||||
|
||||
let(:path) {}
|
||||
describe 'after signout, redirect to signin page if page needs authentication' do
|
||||
include_examples "sign-in redirects", "/plantings/new"
|
||||
include_examples "sign-in redirects", "/harvests/new"
|
||||
include_examples "sign-in redirects", "/posts/new"
|
||||
include_examples "sign-in redirects", "/gardens/new"
|
||||
include_examples "sign-in redirects", "/seeds/new"
|
||||
end
|
||||
|
||||
scenario 'photos' do
|
||||
garden = FactoryBot.create :garden, owner: member
|
||||
visit "/photos/new?id=#{garden.id}&type=garden"
|
||||
expect(current_path).to eq new_member_session_path
|
||||
expect(page).to have_http_status(200)
|
||||
# photos/new needs id&type params,
|
||||
# but these are stripped after signing in
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "account_types/edit" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "account_types/index" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "account_types/new" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "account_types/show" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "accounts/edit" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "accounts/index" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "accounts/new" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "accounts/show" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe 'admin/index.html.haml', type: "view" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe 'admin/newsletter.html.haml', type: "view" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe 'admin/orders/index.html.haml', type: "view" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "comments/edit" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "comments/index" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe 'comments/index.rss.haml' do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "comments/new" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "comments/show" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "crops/_grown_for" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "crops/_planting_advice" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "crops/_popover" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "crops/edit" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "crops/hierarchy" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "crops/index" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe 'crops/index.rss.haml' do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "crops/new" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "crops/wrangle" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe 'devise/mailer/confirmation_instructions.html.haml', type: "view" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe 'devise/mailer/reset_password_instructions.html.haml', type: "view" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
describe 'devise/mailer/unlock_instructions.html.haml', type: "view" do
|
||||
context "logged in" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe 'devise/registrations/edit.html.haml', type: "view" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe 'devise/registrations/new.html.haml', type: "view" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe 'devise/sessions/new.html.haml', type: "view" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe 'devise/unlocks/new.html.haml', type: "view" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "forums/edit" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "forums/index" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "forums/new" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "forums/show" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "gardens/edit" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "gardens/new" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "gardens/show" do
|
||||
@@ -62,6 +50,10 @@ describe "gardens/show" do
|
||||
rendered.should have_content "Plant something"
|
||||
end
|
||||
|
||||
it "shows an 'add photo' button" do
|
||||
rendered.should have_content "Add photo"
|
||||
end
|
||||
|
||||
it "links to the right crop in the planting link" do
|
||||
assert_select("a[href='#{new_planting_path}?garden_id=#{@garden.id}']")
|
||||
end
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "harvests/edit" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "harvests/index" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "harvests/new" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "harvests/show" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe 'home/_blurb.html.haml', type: "view" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe 'home/_crops.html.haml', type: "view" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe 'home/_members.html.haml', type: "view" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe 'home/_seeds.html.haml', type: "view" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe 'home/_stats.html.haml', type: "view" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe 'home/index.html.haml', type: "view" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe 'layouts/_header.html.haml', type: "view" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe 'layouts/_meta.html.haml', type: "view" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe 'layouts/application.html.haml', type: "view" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "notifications/index" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "notifications/new" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "notifications/show" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe 'notifier/notify.html.haml', type: "view" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "orders/index" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "orders/show" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "photos/edit" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "photos/index" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "photos/new" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "photos/show" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "places/_map_attribution.html.haml", type: :view do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "places/index" do
|
||||
|
||||
@@ -1,15 +1,3 @@
|
||||
## DEPRECATION NOTICE: Do not add new tests to this file!
|
||||
##
|
||||
## View and controller tests are deprecated in the Growstuff project.
|
||||
## We no longer write new view and controller tests, but instead write
|
||||
## feature tests (in spec/features) using Capybara (https://github.com/jnicklas/capybara).
|
||||
## These test the full stack, behaving as a browser, and require less complicated setup
|
||||
## to run. Please feel free to delete old view/controller tests as they are reimplemented
|
||||
## in feature tests.
|
||||
##
|
||||
## If you submit a pull request containing new view or controller tests, it will not be
|
||||
## merged.
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe "places/show" do
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user