mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-18 05:29:31 -04:00
be_success -> be_successfull
fixes a deprecation warning
This commit is contained in:
1
.python-version
Normal file
1
.python-version
Normal file
@@ -0,0 +1 @@
|
||||
3.7.2
|
||||
@@ -197,7 +197,8 @@ class CropsController < ApplicationController
|
||||
def crops
|
||||
q = Crop.approved.includes(:scientific_names, plantings: :photos)
|
||||
q = q.popular unless @sort == 'alpha'
|
||||
q.order("LOWER(crops.name)").includes(:photos).paginate(page: params[:page])
|
||||
q.order(Arel.sql("LOWER(crops.name)"))
|
||||
.includes(:photos).paginate(page: params[:page])
|
||||
end
|
||||
|
||||
def requested_crops
|
||||
|
||||
@@ -7,7 +7,7 @@ describe AdminController do
|
||||
before { get :newsletter }
|
||||
|
||||
describe 'fetches the admin newsletter page' do
|
||||
it { expect(response).to be_success }
|
||||
it { expect(response).to be_successful }
|
||||
it { expect(response).to render_template("admin/newsletter") }
|
||||
end
|
||||
|
||||
|
||||
@@ -7,19 +7,19 @@ describe Charts::CropsController do
|
||||
describe 'sunniness' do
|
||||
before { get :sunniness, params: { crop_slug: crop.to_param } }
|
||||
|
||||
it { expect(response).to be_success }
|
||||
it { expect(response).to be_successful }
|
||||
end
|
||||
|
||||
describe 'planted_from' do
|
||||
before { get :planted_from, params: { crop_slug: crop.to_param } }
|
||||
|
||||
it { expect(response).to be_success }
|
||||
it { expect(response).to be_successful }
|
||||
end
|
||||
|
||||
describe 'harvested_for' do
|
||||
before { get :harvested_for, params: { crop_slug: crop.to_param } }
|
||||
|
||||
it { expect(response).to be_success }
|
||||
it { expect(response).to be_successful }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -22,7 +22,7 @@ describe CommentsController do
|
||||
describe "returns an RSS feed" do
|
||||
before { get :index, format: "rss" }
|
||||
|
||||
it { is_expected.to be_success }
|
||||
it { is_expected.to be_successful }
|
||||
it { is_expected.to render_template("comments/index") }
|
||||
it { expect(response.content_type).to eq("application/rss+xml") }
|
||||
it { expect(assigns(:comments)).to eq([last_comment, first_comment]) }
|
||||
@@ -48,7 +48,7 @@ describe CommentsController do
|
||||
|
||||
it "dies if no post specified" do
|
||||
get :new
|
||||
expect(response).not_to be_success
|
||||
expect(response).not_to be_successful
|
||||
end
|
||||
end
|
||||
|
||||
@@ -69,7 +69,7 @@ describe CommentsController do
|
||||
describe "not my comment" do
|
||||
let(:comment) { FactoryBot.create :comment, post: post }
|
||||
|
||||
it { expect(response).not_to be_success }
|
||||
it { expect(response).not_to be_successful }
|
||||
end
|
||||
end
|
||||
|
||||
@@ -87,7 +87,7 @@ describe CommentsController do
|
||||
describe "not my comment" do
|
||||
let(:comment) { FactoryBot.create :comment }
|
||||
|
||||
it { expect(response).not_to be_success }
|
||||
it { expect(response).not_to be_successful }
|
||||
end
|
||||
|
||||
describe "attempting to change post_id" do
|
||||
@@ -117,7 +117,7 @@ describe CommentsController do
|
||||
describe "not my comment" do
|
||||
let(:comment) { FactoryBot.create :comment }
|
||||
|
||||
it { expect(response).not_to be_success }
|
||||
it { expect(response).not_to be_successful }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -12,14 +12,14 @@ describe CropsController do
|
||||
context 'anonymous' do
|
||||
before { get :wrangle }
|
||||
|
||||
it { is_expected.not_to be_success }
|
||||
it { is_expected.not_to be_successful }
|
||||
end
|
||||
|
||||
context 'wrangler' do
|
||||
include_context 'login as wrangler'
|
||||
before { get :wrangle }
|
||||
|
||||
it { is_expected.to be_success }
|
||||
it { is_expected.to be_successful }
|
||||
it { is_expected.to render_template("crops/wrangle") }
|
||||
it { expect(assigns[:crop_wranglers]).to eq(Role.crop_wranglers) }
|
||||
end
|
||||
@@ -32,7 +32,7 @@ describe CropsController do
|
||||
include_context 'login as wrangler'
|
||||
before { get :hierarchy }
|
||||
|
||||
it { is_expected.to be_success }
|
||||
it { is_expected.to be_successful }
|
||||
it { is_expected.to render_template("crops/hierarchy") }
|
||||
end
|
||||
end
|
||||
@@ -46,7 +46,7 @@ describe CropsController do
|
||||
describe 'search form page' do
|
||||
before { get :search }
|
||||
|
||||
it { is_expected.to be_success }
|
||||
it { is_expected.to be_successful }
|
||||
it { is_expected.to render_template("crops/search") }
|
||||
end
|
||||
|
||||
@@ -62,7 +62,7 @@ describe CropsController do
|
||||
describe "returns an RSS feed" do
|
||||
before { get :index, format: "rss" }
|
||||
|
||||
it { is_expected.to be_success }
|
||||
it { is_expected.to be_successful }
|
||||
it { is_expected.to render_template("crops/index") }
|
||||
it { expect(response.content_type).to eq("application/rss+xml") }
|
||||
end
|
||||
|
||||
@@ -18,14 +18,14 @@ describe MembersController do
|
||||
describe "GET JSON index" do
|
||||
it "provides JSON for members" do
|
||||
get :index, format: 'json'
|
||||
response.should be_success
|
||||
response.should be_successful
|
||||
end
|
||||
end
|
||||
|
||||
describe "GET show" do
|
||||
it "provides JSON for member profile" do
|
||||
get :show, params: { slug: @member.to_param }, format: 'json'
|
||||
response.should be_success
|
||||
response.should be_successful
|
||||
end
|
||||
|
||||
it "assigns @posts with the member's posts" do
|
||||
@@ -59,7 +59,7 @@ describe MembersController do
|
||||
describe "returns an RSS feed" do
|
||||
before { get :show, params: { slug: @member.to_param }, format: "rss" }
|
||||
|
||||
it { response.should be_success }
|
||||
it { response.should be_successful }
|
||||
it { response.should render_template("members/show") }
|
||||
it { response.content_type.should eq("application/rss+xml") }
|
||||
end
|
||||
|
||||
@@ -27,7 +27,7 @@ describe PostsController do
|
||||
describe "GET RSS feed" do
|
||||
it "returns an RSS feed" do
|
||||
get :index, format: "rss"
|
||||
expect(response).to be_success
|
||||
expect(response).to be_successful
|
||||
expect(response).to render_template("posts/index")
|
||||
expect(response.content_type).to eq("application/rss+xml")
|
||||
end
|
||||
@@ -37,7 +37,7 @@ describe PostsController do
|
||||
it "returns an RSS feed" do
|
||||
post = Post.create! valid_attributes
|
||||
get :show, format: "rss", params: { id: post.slug }
|
||||
expect(response).to be_success
|
||||
expect(response).to be_successful
|
||||
expect(response).to render_template("posts/show")
|
||||
expect(response.content_type).to eq("application/rss+xml")
|
||||
end
|
||||
|
||||
@@ -15,7 +15,7 @@ describe RobotsController do
|
||||
it 'loads the staging robots.txt file' do
|
||||
get :robots
|
||||
|
||||
expect(response).to be_success
|
||||
expect(response).to be_successful
|
||||
expect(response.body).to eq(File.read(staging_filename))
|
||||
end
|
||||
end
|
||||
@@ -26,7 +26,7 @@ describe RobotsController do
|
||||
it 'loads the production robots.txt file' do
|
||||
get :robots
|
||||
|
||||
expect(response).to be_success
|
||||
expect(response).to be_successful
|
||||
expect(response.body).to eq(File.read(production_filename))
|
||||
end
|
||||
end
|
||||
@@ -37,7 +37,7 @@ describe RobotsController do
|
||||
it 'loads the production robots.txt file' do
|
||||
get :robots
|
||||
|
||||
expect(response).to be_success
|
||||
expect(response).to be_successful
|
||||
expect(response.body).to eq(File.read(production_filename))
|
||||
end
|
||||
end
|
||||
@@ -48,7 +48,7 @@ describe RobotsController do
|
||||
it 'loads the production robots.txt file' do
|
||||
get :robots
|
||||
|
||||
expect(response).to be_success
|
||||
expect(response).to be_successful
|
||||
expect(response.body).to eq(File.read(production_filename))
|
||||
end
|
||||
end
|
||||
|
||||
@@ -16,7 +16,7 @@ describe SeedsController do
|
||||
describe 'GET new' do
|
||||
before { sign_in owner }
|
||||
|
||||
it { expect(response).to be_success }
|
||||
it { expect(response).to be_successful }
|
||||
|
||||
context 'no parent planting' do
|
||||
before { get :new }
|
||||
|
||||
Reference in New Issue
Block a user