Replace be_success with be_successful in specs.

be_success is deprecated and will be removed in Rails 6.
This commit is contained in:
Dennis Schubert 2020-02-11 19:51:34 +01:00 committed by Benjamin Neff
parent 45e8b54bea
commit e40a07f204
No known key found for this signature in database
GPG key ID: 971464C3F1A90194
21 changed files with 84 additions and 84 deletions

View file

@ -30,7 +30,7 @@ describe AdminsController, :type => :controller do
it "succeeds" do it "succeeds" do
get :dashboard get :dashboard
expect(response).to be_success expect(response).to be_successful
end end
it "warns the user about unreviewed reports" do it "warns the user about unreviewed reports" do
@ -62,7 +62,7 @@ describe AdminsController, :type => :controller do
it 'succeeds and renders user_search' do it 'succeeds and renders user_search' do
get :user_search get :user_search
expect(response).to be_success expect(response).to be_successful
expect(response).to render_template(:user_search) expect(response).to render_template(:user_search)
end end
@ -139,7 +139,7 @@ describe AdminsController, :type => :controller do
it "succeeds and renders stats" do it "succeeds and renders stats" do
get :stats get :stats
expect(response).to be_success expect(response).to be_successful
expect(response).to render_template(:stats) expect(response).to render_template(:stats)
expect(response.body).to include( expect(response.body).to include(
I18n.translate( I18n.translate(
@ -151,7 +151,7 @@ describe AdminsController, :type => :controller do
it "succeeds and renders stats for different ranges" do it "succeeds and renders stats for different ranges" do
%w(week 2weeks month).each do |range| %w(week 2weeks month).each do |range|
get :stats, params: {range: range} get :stats, params: {range: range}
expect(response).to be_success expect(response).to be_successful
expect(response).to render_template(:stats) expect(response).to render_template(:stats)
expect(response.body).not_to include( expect(response.body).not_to include(
I18n.translate( I18n.translate(

View file

@ -25,7 +25,7 @@ describe AspectMembershipsController, type: :controller do
it "succeeds" do it "succeeds" do
post :create, params: {person_id: bob.person.id, aspect_id: @aspect1.id}, format: :json post :create, params: {person_id: bob.person.id, aspect_id: @aspect1.id}, format: :json
expect(response).to be_success expect(response).to be_successful
end end
it "creates an aspect membership" do it "creates an aspect membership" do
@ -75,14 +75,14 @@ describe AspectMembershipsController, type: :controller do
it "removes contacts from an aspect" do it "removes contacts from an aspect" do
membership = alice.add_contact_to_aspect(@contact, @aspect1) membership = alice.add_contact_to_aspect(@contact, @aspect1)
delete :destroy, params: {id: membership.id}, format: :json delete :destroy, params: {id: membership.id}, format: :json
expect(response).to be_success expect(response).to be_successful
@aspect1.reload @aspect1.reload
expect(@aspect1.contacts.to_a).not_to include @contact expect(@aspect1.contacts.to_a).not_to include @contact
end end
it "aspect membership does not exist" do it "aspect membership does not exist" do
delete :destroy, params: {id: 123}, format: :json delete :destroy, params: {id: 123}, format: :json
expect(response).not_to be_success expect(response).not_to be_successful
expect(response.body).to eq(I18n.t("aspect_memberships.destroy.no_membership")) expect(response.body).to eq(I18n.t("aspect_memberships.destroy.no_membership"))
end end
end end

View file

@ -29,7 +29,7 @@ describe CommentsController, :type => :controller do
it 'responds to format mobile' do it 'responds to format mobile' do
post :create, params: comment_hash, format: :mobile post :create, params: comment_hash, format: :mobile
expect(response).to be_success expect(response).to be_successful
end end
end end
@ -136,7 +136,7 @@ describe CommentsController, :type => :controller do
it 'works for mobile' do it 'works for mobile' do
get :index, params: {post_id: @message.id}, format: :mobile get :index, params: {post_id: @message.id}, format: :mobile
expect(response).to be_success expect(response).to be_successful
end end
it 'returns all the comments for a post' do it 'returns all the comments for a post' do

View file

@ -14,14 +14,14 @@ describe ContactsController, :type => :controller do
context 'format mobile' do context 'format mobile' do
it "succeeds" do it "succeeds" do
get :index, format: :mobile get :index, format: :mobile
expect(response).to be_success expect(response).to be_successful
end end
end end
context 'format html' do context 'format html' do
it "succeeds" do it "succeeds" do
get :index get :index
expect(response).to be_success expect(response).to be_successful
end end
it "doesn't assign contacts" do it "doesn't assign contacts" do
@ -43,7 +43,7 @@ describe ContactsController, :type => :controller do
it "succeeds" do it "succeeds" do
get :index, params: {q: @person1.first_name}, format: :json get :index, params: {q: @person1.first_name}, format: :json
expect(response).to be_success expect(response).to be_successful
end end
it "responds with json" do it "responds with json" do
@ -133,7 +133,7 @@ describe ContactsController, :type => :controller do
describe '#spotlight' do describe '#spotlight' do
it 'succeeds' do it 'succeeds' do
get :spotlight get :spotlight
expect(response).to be_success expect(response).to be_successful
end end
it 'gets queries for users in the app config' do it 'gets queries for users in the app config' do

View file

@ -20,7 +20,7 @@ describe ConversationsController, :type => :controller do
context "desktop" do context "desktop" do
it "succeeds" do it "succeeds" do
get :new, params: {modal: true} get :new, params: {modal: true}
expect(response).to be_success expect(response).to be_successful
end end
end end
@ -76,13 +76,13 @@ describe ConversationsController, :type => :controller do
it "succeeds" do it "succeeds" do
get :index get :index
expect(response).to be_success expect(response).to be_successful
expect(assigns[:visibilities]).to match_array(@visibilities) expect(assigns[:visibilities]).to match_array(@visibilities)
end end
it "succeeds with json" do it "succeeds with json" do
get :index, format: :json get :index, format: :json
expect(response).to be_success expect(response).to be_successful
json = JSON.parse(response.body) json = JSON.parse(response.body)
expect(json.first["conversation"]).to be_present expect(json.first["conversation"]).to be_present
end end
@ -94,7 +94,7 @@ describe ConversationsController, :type => :controller do
it "retrieves a conversation" do it "retrieves a conversation" do
get :index, params: {conversation_id: @conversations.first.id} get :index, params: {conversation_id: @conversations.first.id}
expect(response).to be_success expect(response).to be_successful
expect(assigns[:visibilities]).to match_array(@visibilities) expect(assigns[:visibilities]).to match_array(@visibilities)
expect(assigns[:conversation]).to eq(@conversations.first) expect(assigns[:conversation]).to eq(@conversations.first)
end end
@ -108,7 +108,7 @@ describe ConversationsController, :type => :controller do
it "retrieves a conversation message with out markdown content " do it "retrieves a conversation message with out markdown content " do
get :index get :index
@conversation = @conversations.first @conversation = @conversations.first
expect(response).to be_success expect(response).to be_successful
expect(response.body).to match(/cool stuff/) expect(response.body).to match(/cool stuff/)
expect(response.body).not_to match(%r{<strong>cool stuff</strong>}) expect(response.body).not_to match(%r{<strong>cool stuff</strong>})
end end
@ -134,7 +134,7 @@ describe ConversationsController, :type => :controller do
it "responds with the conversation id as JSON" do it "responds with the conversation id as JSON" do
post :create, params: params, format: :js post :create, params: params, format: :js
expect(response).to be_success expect(response).to be_successful
expect(JSON.parse(response.body)["id"]).to eq(Conversation.first.id) expect(JSON.parse(response.body)["id"]).to eq(Conversation.first.id)
end end
@ -172,7 +172,7 @@ describe ConversationsController, :type => :controller do
it "responds with the conversation id as JSON" do it "responds with the conversation id as JSON" do
post :create, params: params, format: :js post :create, params: params, format: :js
expect(response).to be_success expect(response).to be_successful
expect(JSON.parse(response.body)["id"]).to eq(Conversation.first.id) expect(JSON.parse(response.body)["id"]).to eq(Conversation.first.id)
end end
end end
@ -195,7 +195,7 @@ describe ConversationsController, :type => :controller do
it "responds with an error message" do it "responds with an error message" do
post :create, params: params, format: :js post :create, params: params, format: :js
expect(response).not_to be_success expect(response).not_to be_successful
expect(response.body).to eq(I18n.t("conversations.create.fail")) expect(response.body).to eq(I18n.t("conversations.create.fail"))
end end
end end
@ -218,7 +218,7 @@ describe ConversationsController, :type => :controller do
it "responds with an error message" do it "responds with an error message" do
post :create, params: params, format: :js post :create, params: params, format: :js
expect(response).not_to be_success expect(response).not_to be_successful
expect(response.body).to eq(I18n.t("javascripts.conversation.create.no_recipient")) expect(response.body).to eq(I18n.t("javascripts.conversation.create.no_recipient"))
end end
end end
@ -241,7 +241,7 @@ describe ConversationsController, :type => :controller do
it "responds with an error message" do it "responds with an error message" do
post :create, params: params, format: :js post :create, params: params, format: :js
expect(response).not_to be_success expect(response).not_to be_successful
expect(response.body).to eq(I18n.t("javascripts.conversation.create.no_recipient")) expect(response.body).to eq(I18n.t("javascripts.conversation.create.no_recipient"))
end end
end end
@ -272,7 +272,7 @@ describe ConversationsController, :type => :controller do
it "responds with an error message" do it "responds with an error message" do
post :create, params: params, format: :js post :create, params: params, format: :js
expect(response).not_to be_success expect(response).not_to be_successful
expect(response.body).to eq(I18n.t("javascripts.conversation.create.no_recipient")) expect(response.body).to eq(I18n.t("javascripts.conversation.create.no_recipient"))
end end
end end
@ -301,7 +301,7 @@ describe ConversationsController, :type => :controller do
it "responds with the conversation id as JSON" do it "responds with the conversation id as JSON" do
post :create, params: params, format: :js post :create, params: params, format: :js
expect(response).to be_success expect(response).to be_successful
expect(JSON.parse(response.body)["id"]).to eq(Conversation.first.id) expect(JSON.parse(response.body)["id"]).to eq(Conversation.first.id)
end end
@ -339,7 +339,7 @@ describe ConversationsController, :type => :controller do
it "responds with the conversation id as JSON" do it "responds with the conversation id as JSON" do
post :create, params: params, format: :js post :create, params: params, format: :js
expect(response).to be_success expect(response).to be_successful
expect(JSON.parse(response.body)["id"]).to eq(Conversation.first.id) expect(JSON.parse(response.body)["id"]).to eq(Conversation.first.id)
end end
end end
@ -362,7 +362,7 @@ describe ConversationsController, :type => :controller do
it "responds with an error message" do it "responds with an error message" do
post :create, params: params, format: :js post :create, params: params, format: :js
expect(response).not_to be_success expect(response).not_to be_successful
expect(response.body).to eq(I18n.t("conversations.create.fail")) expect(response.body).to eq(I18n.t("conversations.create.fail"))
end end
end end
@ -385,7 +385,7 @@ describe ConversationsController, :type => :controller do
it "responds with an error message" do it "responds with an error message" do
post :create, params: params, format: :js post :create, params: params, format: :js
expect(response).not_to be_success expect(response).not_to be_successful
expect(response.body).to eq(I18n.t("javascripts.conversation.create.no_recipient")) expect(response.body).to eq(I18n.t("javascripts.conversation.create.no_recipient"))
end end
end end
@ -408,7 +408,7 @@ describe ConversationsController, :type => :controller do
it "responds with an error message" do it "responds with an error message" do
post :create, params: params, format: :js post :create, params: params, format: :js
expect(response).not_to be_success expect(response).not_to be_successful
expect(response.body).to eq(I18n.t("javascripts.conversation.create.no_recipient")) expect(response.body).to eq(I18n.t("javascripts.conversation.create.no_recipient"))
end end
end end
@ -433,7 +433,7 @@ describe ConversationsController, :type => :controller do
it "responds with an error message" do it "responds with an error message" do
post :create, params: params, format: :js post :create, params: params, format: :js
expect(response).not_to be_success expect(response).not_to be_successful
expect(response.body).to eq(I18n.t("javascripts.conversation.create.no_recipient")) expect(response.body).to eq(I18n.t("javascripts.conversation.create.no_recipient"))
end end
end end
@ -452,7 +452,7 @@ describe ConversationsController, :type => :controller do
it "succeeds with json" do it "succeeds with json" do
get :show, params: {id: conversation.id}, format: :json get :show, params: {id: conversation.id}, format: :json
expect(response).to be_success expect(response).to be_successful
expect(assigns[:conversation]).to eq(conversation) expect(assigns[:conversation]).to eq(conversation)
expect(response.body).to include conversation.guid expect(response.body).to include conversation.guid
end end

View file

@ -4,7 +4,7 @@ describe HelpController, type: :controller do
describe "#faq" do describe "#faq" do
it "succeeds" do it "succeeds" do
get :faq get :faq
expect(response).to be_success expect(response).to be_successful
end end
it "fails on mobile" do it "fails on mobile" do

View file

@ -33,12 +33,12 @@ describe HomeController, type: :controller do
describe "#podmin" do describe "#podmin" do
it "succeeds" do it "succeeds" do
get :podmin get :podmin
expect(response).to be_success expect(response).to be_successful
end end
it "succeeds on mobile" do it "succeeds on mobile" do
get :podmin, format: :mobile get :podmin, format: :mobile
expect(response).to be_success expect(response).to be_successful
end end
end end

View file

@ -54,7 +54,7 @@ TXT
Timecop.travel(time) do Timecop.travel(time) do
get :multi, :format => :json get :multi, :format => :json
expect(response).to be_success expect(response).to be_successful
save_fixture(response.body, "stream_json") save_fixture(response.body, "stream_json")
end end
end end

View file

@ -5,7 +5,7 @@ describe NodeInfoController do
it "responds to JSON" do it "responds to JSON" do
get :jrd, format: :json get :jrd, format: :json
expect(response).to be_success expect(response).to be_successful
end end
it "returns a JRD" do it "returns a JRD" do
@ -38,7 +38,7 @@ describe NodeInfoController do
it "responds to JSON" do it "responds to JSON" do
get :document, params: {version: version}, format: :json get :document, params: {version: version}, format: :json
expect(response).to be_success expect(response).to be_successful
end end
it "calls NodeInfoPresenter" do it "calls NodeInfoPresenter" do

View file

@ -37,7 +37,7 @@ describe NotificationsController, :type => :controller do
end end
get :update, params: {id: note.id, set_unread: "true"}, format: :json get :update, params: {id: note.id, set_unread: "true"}, format: :json
expect(response).to be_success expect(response).to be_successful
updated_note = Notification.find(note.id) updated_note = Notification.find(note.id)
expect(updated_note.unread).to eq(true) expect(updated_note.unread).to eq(true)
@ -64,7 +64,7 @@ describe NotificationsController, :type => :controller do
it 'succeeds' do it 'succeeds' do
get :index get :index
expect(response).to be_success expect(response).to be_successful
expect(assigns[:notifications].count).to eq(1) expect(assigns[:notifications].count).to eq(1)
end end
@ -73,7 +73,7 @@ describe NotificationsController, :type => :controller do
@notification.touch @notification.touch
end end
get :index, format: :json get :index, format: :json
expect(response).to be_success expect(response).to be_successful
response_json = JSON.parse(response.body) response_json = JSON.parse(response.body)
note_html = Nokogiri::HTML(response_json["notification_list"][0]["also_commented"]["note_html"]) note_html = Nokogiri::HTML(response_json["notification_list"][0]["also_commented"]["note_html"])
timeago_content = note_html.css("time")[0]["data-time-ago"] timeago_content = note_html.css("time")[0]["data-time-ago"]
@ -94,7 +94,7 @@ describe NotificationsController, :type => :controller do
it 'succeeds on mobile' do it 'succeeds on mobile' do
get :index, format: :mobile get :index, format: :mobile
expect(response).to be_success expect(response).to be_successful
end end
it 'paginates the notifications' do it 'paginates the notifications' do
@ -128,7 +128,7 @@ describe NotificationsController, :type => :controller do
it 'succeeds on mobile' do it 'succeeds on mobile' do
eve.share_with(alice.person, eve.aspects.first) eve.share_with(alice.person, eve.aspects.first)
get :index, format: :mobile get :index, format: :mobile
expect(response).to be_success expect(response).to be_successful
end end
end end
@ -157,12 +157,12 @@ describe NotificationsController, :type => :controller do
it "succeeds" do it "succeeds" do
get :index get :index
expect(response).to be_success expect(response).to be_successful
end end
it "succeeds on mobile" do it "succeeds on mobile" do
get :index, format: :mobile get :index, format: :mobile
expect(response).to be_success expect(response).to be_successful
end end
end end
end end

View file

@ -33,7 +33,7 @@ describe PeopleController, :type => :controller do
describe 'via json' do describe 'via json' do
it 'succeeds' do it 'succeeds' do
get :index, params: {q: "Korth"}, format: :json get :index, params: {q: "Korth"}, format: :json
expect(response).to be_success expect(response).to be_successful
end end
it 'responds with json' do it 'responds with json' do
@ -109,23 +109,23 @@ describe PeopleController, :type => :controller do
it "succeeds if there is exactly one match" do it "succeeds if there is exactly one match" do
get :index, params: {q: "Korth"} get :index, params: {q: "Korth"}
expect(assigns[:people].length).to eq(1) expect(assigns[:people].length).to eq(1)
expect(response).to be_success expect(response).to be_successful
end end
it "succeeds if there are no matches" do it "succeeds if there are no matches" do
get :index, params: {q: "Korthsauce"} get :index, params: {q: "Korthsauce"}
expect(assigns[:people].length).to eq(0) expect(assigns[:people].length).to eq(0)
expect(response).to be_success expect(response).to be_successful
end end
it 'succeeds if you search for the empty term' do it 'succeeds if you search for the empty term' do
get :index, params: {q: ""} get :index, params: {q: ""}
expect(response).to be_success expect(response).to be_successful
end end
it 'succeeds if you search for punctuation' do it 'succeeds if you search for punctuation' do
get :index, params: {q: "+"} get :index, params: {q: "+"}
expect(response).to be_success expect(response).to be_successful
end end
it "excludes people who have searchable off" do it "excludes people who have searchable off" do
@ -225,7 +225,7 @@ describe PeopleController, :type => :controller do
profile = user2.profile profile = user2.profile
profile.update_attribute(:first_name, "</script><script> alert('xss attack');</script>") profile.update_attribute(:first_name, "</script><script> alert('xss attack');</script>")
get :show, params: {id: user2.person.to_param} get :show, params: {id: user2.person.to_param}
expect(response).to be_success expect(response).to be_successful
expect(response.body).not_to include(profile.first_name) expect(response.body).not_to include(profile.first_name)
end end
@ -244,12 +244,12 @@ describe PeopleController, :type => :controller do
context "when the person is the current user" do context "when the person is the current user" do
it "succeeds" do it "succeeds" do
get :show, params: {id: @user.person.to_param} get :show, params: {id: @user.person.to_param}
expect(response).to be_success expect(response).to be_successful
end end
it 'succeeds on the mobile site' do it 'succeeds on the mobile site' do
get :show, params: {id: @user.person.to_param}, format: :mobile get :show, params: {id: @user.person.to_param}, format: :mobile
expect(response).to be_success expect(response).to be_successful
end end
it "assigns the right person" do it "assigns the right person" do
@ -271,7 +271,7 @@ describe PeopleController, :type => :controller do
it 'succeeds on the mobile site' do it 'succeeds on the mobile site' do
get :show, params: {id: @person.to_param}, format: :mobile get :show, params: {id: @person.to_param}, format: :mobile
expect(response).to be_success expect(response).to be_successful
end end
it 'forces to sign in if the person is remote' do it 'forces to sign in if the person is remote' do
@ -316,12 +316,12 @@ describe PeopleController, :type => :controller do
it "succeeds" do it "succeeds" do
get :show, params: {id: @person.to_param} get :show, params: {id: @person.to_param}
expect(response).to be_success expect(response).to be_successful
end end
it 'succeeds on the mobile site' do it 'succeeds on the mobile site' do
get :show, params: {id: @person.to_param}, format: :mobile get :show, params: {id: @person.to_param}, format: :mobile
expect(response).to be_success expect(response).to be_successful
end end
it 'marks a corresponding notifications as read' do it 'marks a corresponding notifications as read' do
@ -351,12 +351,12 @@ describe PeopleController, :type => :controller do
it "succeeds" do it "succeeds" do
get :show, params: {id: @person.to_param} get :show, params: {id: @person.to_param}
expect(response).to be_success expect(response).to be_successful
end end
it 'succeeds on the mobile site' do it 'succeeds on the mobile site' do
get :show, params: {id: @person.to_param}, format: :mobile get :show, params: {id: @person.to_param}, format: :mobile
expect(response).to be_success expect(response).to be_successful
end end
it "leaks no private profile info" do it "leaks no private profile info" do
@ -406,7 +406,7 @@ describe PeopleController, :type => :controller do
message = @user.post :status_message, :text => 'test more', :to => @aspect.id message = @user.post :status_message, :text => 'test more', :to => @aspect.id
@user.comment!(message, cmmt) @user.comment!(message, cmmt)
get :stream, params: {person_id: @user.person.to_param}, format: :json get :stream, params: {person_id: @user.person.to_param}, format: :json
expect(response).to be_success expect(response).to be_successful
expect(response.body).to include(cmmt) expect(response.body).to include(cmmt)
end end
end end

View file

@ -81,17 +81,17 @@ describe PhotosController, :type => :controller do
it "succeeds without any available pictures" do it "succeeds without any available pictures" do
get :index, params: {person_id: FactoryGirl.create(:person).guid} get :index, params: {person_id: FactoryGirl.create(:person).guid}
expect(response).to be_success expect(response).to be_successful
end end
it "succeeds on mobile devices without any available pictures" do it "succeeds on mobile devices without any available pictures" do
get :index, params: {person_id: FactoryGirl.create(:person).guid}, format: :mobile get :index, params: {person_id: FactoryGirl.create(:person).guid}, format: :mobile
expect(response).to be_success expect(response).to be_successful
end end
it "succeeds on mobile devices with available pictures" do it "succeeds on mobile devices with available pictures" do
get :index, params: {person_id: bob.person.guid}, format: :mobile get :index, params: {person_id: bob.person.guid}, format: :mobile
expect(response).to be_success expect(response).to be_successful
end end
it "displays the logged in user's pictures" do it "displays the logged in user's pictures" do
@ -145,7 +145,7 @@ describe PhotosController, :type => :controller do
it "succeeds on the mobile site" do it "succeeds on the mobile site" do
get :index, params: {person_id: @person.to_param}, format: :mobile get :index, params: {person_id: @person.to_param}, format: :mobile
expect(response).to be_success expect(response).to be_successful
end end
it "forces to sign in if the person is remote" do it "forces to sign in if the person is remote" do
@ -227,7 +227,7 @@ describe PhotosController, :type => :controller do
it 'should return 200 for existing stuff on mobile devices' do it 'should return 200 for existing stuff on mobile devices' do
get :show, params: {person_id: alice.person.guid, id: @alices_photo.id}, format: :mobile get :show, params: {person_id: alice.person.guid, id: @alices_photo.id}, format: :mobile
expect(response).to be_success expect(response).to be_successful
end end
it "doesn't leak private photos to the public" do it "doesn't leak private photos to the public" do

View file

@ -19,7 +19,7 @@ describe PostsController, type: :controller do
expect_any_instance_of(PostService).to receive(:mark_user_notifications).with(post.id) expect_any_instance_of(PostService).to receive(:mark_user_notifications).with(post.id)
get :show, params: {id: post.id} get :show, params: {id: post.id}
expect(response).to be_success expect(response).to be_successful
end end
it "succeeds after removing a mention when closing the mentioned user's account" do it "succeeds after removing a mention when closing the mentioned user's account" do
@ -32,7 +32,7 @@ describe PostsController, type: :controller do
user.close_account! user.close_account!
get :show, params: {id: msg.id} get :show, params: {id: msg.id}
expect(response).to be_success expect(response).to be_successful
end end
it "renders the application layout on mobile" do it "renders the application layout on mobile" do
@ -45,7 +45,7 @@ describe PostsController, type: :controller do
expect_any_instance_of(PostService).to receive(:mark_user_notifications).with(reshare_id) expect_any_instance_of(PostService).to receive(:mark_user_notifications).with(reshare_id)
get :show, params: {id: reshare_id}, format: :mobile get :show, params: {id: reshare_id}, format: :mobile
expect(response).to be_success expect(response).to be_successful
end end
end end

View file

@ -25,7 +25,7 @@ describe ProfilesController, :type => :controller do
describe '#edit' do describe '#edit' do
it 'succeeds' do it 'succeeds' do
get :edit get :edit
expect(response).to be_success expect(response).to be_successful
end end
it 'sets the profile to the current users profile' do it 'sets the profile to the current users profile' do

View file

@ -13,7 +13,7 @@ describe ResharesController, :type => :controller do
it 'requires authentication' do it 'requires authentication' do
post_request! post_request!
expect(response).not_to be_success expect(response).not_to be_successful
end end
context 'with an authenticated user' do context 'with an authenticated user' do
@ -23,7 +23,7 @@ describe ResharesController, :type => :controller do
end end
it 'succeeds' do it 'succeeds' do
expect(response).to be_success expect(response).to be_successful
post_request! post_request!
end end

View file

@ -17,7 +17,7 @@ describe ShareVisibilitiesController, :type => :controller do
it 'succeeds' do it 'succeeds' do
put :update, params: {id: 42, post_id: @status.id}, format: :js put :update, params: {id: 42, post_id: @status.id}, format: :js
expect(response).to be_success expect(response).to be_successful
end end
it 'it calls toggle_hidden_shareable' do it 'it calls toggle_hidden_shareable' do

View file

@ -17,7 +17,7 @@ describe StatusMessagesController, :type => :controller do
describe '#bookmarklet' do describe '#bookmarklet' do
it 'succeeds' do it 'succeeds' do
get :bookmarklet get :bookmarklet
expect(response).to be_success expect(response).to be_successful
end end
it 'contains a complete html document' do it 'contains a complete html document' do
@ -34,14 +34,14 @@ describe StatusMessagesController, :type => :controller do
title: "Surprised Kitty", title: "Surprised Kitty",
notes: "cute kitty" notes: "cute kitty"
} }
expect(response).to be_success expect(response).to be_successful
end end
end end
describe '#new' do describe '#new' do
it 'succeeds' do it 'succeeds' do
get :new, params: {person_id: bob.person.id} get :new, params: {person_id: bob.person.id}
expect(response).to be_success expect(response).to be_successful
end end
it 'should redirect on desktop version' do it 'should redirect on desktop version' do

View file

@ -15,19 +15,19 @@ describe StreamsController, :type => :controller do
describe "#public" do describe "#public" do
it "succeeds" do it "succeeds" do
get :public get :public
expect(response).to be_success expect(response).to be_successful
end end
end end
describe "#multi" do describe "#multi" do
it "succeeds" do it "succeeds" do
get :multi get :multi
expect(response).to be_success expect(response).to be_successful
end end
it "succeeds on mobile" do it "succeeds on mobile" do
get :multi, format: :mobile get :multi, format: :mobile
expect(response).to be_success expect(response).to be_successful
end end
context "getting started" do context "getting started" do
@ -54,7 +54,7 @@ describe StreamsController, :type => :controller do
describe "a GET to #{stream_path}" do describe "a GET to #{stream_path}" do
it "assigns a stream of the proper class" do it "assigns a stream of the proper class" do
get stream_path get stream_path
expect(response).to be_success expect(response).to be_successful
expect(assigns[:stream]).to be_a stream_class expect(assigns[:stream]).to be_a stream_class
end end
end end
@ -65,12 +65,12 @@ describe StreamsController, :type => :controller do
describe "#public" do describe "#public" do
it "succeeds" do it "succeeds" do
get :public get :public
expect(response).to be_success expect(response).to be_successful
end end
it "succeeds on mobile" do it "succeeds on mobile" do
get :public, format: :mobile get :public, format: :mobile
expect(response).to be_success expect(response).to be_successful
end end
end end

View file

@ -105,7 +105,7 @@ describe TagsController, :type => :controller do
it 'succeeds with mobile' do it 'succeeds with mobile' do
get :show, params: {name: "foo"}, format: :mobile get :show, params: {name: "foo"}, format: :mobile
expect(response).to be_success expect(response).to be_successful
end end
it "returns the post with the correct age" do it "returns the post with the correct age" do

View file

@ -4,12 +4,12 @@ describe TermsController, type: :controller do
describe "#index" do describe "#index" do
it "succeeds" do it "succeeds" do
get :index get :index
expect(response).to be_success expect(response).to be_successful
end end
it "succeeds on mobile" do it "succeeds on mobile" do
get :index, format: :mobile get :index, format: :mobile
expect(response).to be_success expect(response).to be_successful
end end
end end
end end

View file

@ -327,12 +327,12 @@ describe UsersController, :type => :controller do
describe 'getting_started' do describe 'getting_started' do
it 'does not fail miserably' do it 'does not fail miserably' do
get :getting_started get :getting_started
expect(response).to be_success expect(response).to be_successful
end end
it 'does not fail miserably on mobile' do it 'does not fail miserably on mobile' do
get :getting_started, format: :mobile get :getting_started, format: :mobile
expect(response).to be_success expect(response).to be_successful
end end
context "with inviter" do context "with inviter" do