Commit 31b508e8 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'fix-deprecation-warnings-change-success-to-successful' into 'master'

Change `be_success` to `be_successful` in specs

See merge request gitlab-org/gitlab-ce!31969
parents 0b84ff0e 6a641193
......@@ -172,7 +172,7 @@ describe Groups::GroupMembersController do
it '[JS] removes user from members' do
delete :destroy, params: { group_id: group, id: member }, xhr: true
expect(response).to be_success
expect(response).to be_successful
expect(group.members).not_to include member
end
end
......
......@@ -186,7 +186,7 @@ describe Groups::MilestonesController do
it "removes milestone" do
delete :destroy, params: { group_id: group.to_param, id: milestone.iid }, format: :js
expect(response).to be_success
expect(response).to be_successful
expect { Milestone.find(milestone.id) }.to raise_exception(ActiveRecord::RecordNotFound)
end
end
......
......@@ -33,14 +33,14 @@ describe HealthCheckController do
get :index
expect(response).to be_success
expect(response).to be_successful
expect(response.content_type).to eq 'text/plain'
end
it 'supports passing the token in query params' do
get :index, params: { token: token }
expect(response).to be_success
expect(response).to be_successful
expect(response.content_type).to eq 'text/plain'
end
end
......@@ -54,14 +54,14 @@ describe HealthCheckController do
it 'supports successful plaintext response' do
get :index
expect(response).to be_success
expect(response).to be_successful
expect(response.content_type).to eq 'text/plain'
end
it 'supports successful json response' do
get :index, format: :json
expect(response).to be_success
expect(response).to be_successful
expect(response.content_type).to eq 'application/json'
expect(json_response['healthy']).to be true
end
......@@ -69,7 +69,7 @@ describe HealthCheckController do
it 'supports successful xml response' do
get :index, format: :xml
expect(response).to be_success
expect(response).to be_successful
expect(response.content_type).to eq 'application/xml'
expect(xml_response['healthy']).to be true
end
......@@ -77,7 +77,7 @@ describe HealthCheckController do
it 'supports successful responses for specific checks' do
get :index, params: { checks: 'email' }, format: :json
expect(response).to be_success
expect(response).to be_successful
expect(response.content_type).to eq 'application/json'
expect(json_response['healthy']).to be true
end
......
......@@ -114,7 +114,7 @@ describe HelpController do
path: 'user/project/img/labels_default_v12_1'
},
format: :png
expect(response).to be_success
expect(response).to be_successful
expect(response.content_type).to eq 'image/png'
expect(response.headers['Content-Disposition']).to match(/^inline;/)
end
......
......@@ -10,7 +10,7 @@ describe Profiles::KeysController do
it "does not generally work" do
get :get_keys, params: { username: 'not-existent' }
expect(response).not_to be_success
expect(response).not_to be_successful
end
end
......@@ -18,7 +18,7 @@ describe Profiles::KeysController do
it "does generally work" do
get :get_keys, params: { username: user.username }
expect(response).to be_success
expect(response).to be_successful
end
it "renders all keys separated with a new line" do
......@@ -41,7 +41,7 @@ describe Profiles::KeysController do
it "does generally work" do
get :get_keys, params: { username: user.username }
expect(response).to be_success
expect(response).to be_successful
end
it "renders all non deploy keys separated with a new line" do
......
......@@ -20,9 +20,7 @@ describe Projects::Ci::LintsController do
get :show, params: { namespace_id: project.namespace, project_id: project }
end
it 'is success' do
expect(response).to be_success
end
it { expect(response).to be_successful }
it 'renders show page' do
expect(response).to render_template :show
......@@ -78,9 +76,7 @@ describe Projects::Ci::LintsController do
post :create, params: { namespace_id: project.namespace, project_id: project, content: content }
end
it 'is success' do
expect(response).to be_success
end
it { expect(response).to be_successful }
it 'render show page' do
expect(response).to render_template :show
......
......@@ -45,14 +45,14 @@ describe Projects::CommitController do
it 'handles binary files' do
go(id: TestEnv::BRANCH_SHA['binary-encoding'], format: 'html')
expect(response).to be_success
expect(response).to be_successful
end
shared_examples "export as" do |format|
it "does generally work" do
go(id: commit.id, format: format)
expect(response).to be_success
expect(response).to be_successful
end
it "generates it" do
......@@ -110,7 +110,7 @@ describe Projects::CommitController do
id: commit.id
})
expect(response).to be_success
expect(response).to be_successful
end
end
......@@ -177,7 +177,7 @@ describe Projects::CommitController do
id: commit.id
})
expect(response).not_to be_success
expect(response).not_to be_successful
expect(response).to have_gitlab_http_status(404)
end
end
......@@ -234,7 +234,7 @@ describe Projects::CommitController do
id: master_pickable_commit.id
})
expect(response).not_to be_success
expect(response).not_to be_successful
expect(response).to have_gitlab_http_status(404)
end
end
......
......@@ -79,7 +79,7 @@ describe Projects::CommitsController do
end
it "renders as atom" do
expect(response).to be_success
expect(response).to be_successful
expect(response.content_type).to eq('application/atom+xml')
end
......@@ -104,7 +104,7 @@ describe Projects::CommitsController do
end
it "renders as HTML" do
expect(response).to be_success
expect(response).to be_successful
expect(response.content_type).to eq('text/html')
end
end
......
......@@ -19,7 +19,7 @@ describe Projects::CompareController do
end
it 'returns successfully' do
expect(response).to be_success
expect(response).to be_successful
end
end
......@@ -49,7 +49,7 @@ describe Projects::CompareController do
it 'shows some diffs with ignore whitespace change option' do
show_request
expect(response).to be_success
expect(response).to be_successful
diff_file = assigns(:diffs).diff_files.first
expect(diff_file).not_to be_nil
expect(assigns(:commits).length).to be >= 1
......@@ -67,7 +67,7 @@ describe Projects::CompareController do
it 'sets the diffs and commits ivars' do
show_request
expect(response).to be_success
expect(response).to be_successful
expect(assigns(:diffs).diff_files.first).not_to be_nil
expect(assigns(:commits).length).to be >= 1
end
......@@ -81,7 +81,7 @@ describe Projects::CompareController do
it 'sets empty diff and commit ivars' do
show_request
expect(response).to be_success
expect(response).to be_successful
expect(assigns(:diffs)).to eq([])
expect(assigns(:commits)).to eq([])
end
......@@ -94,7 +94,7 @@ describe Projects::CompareController do
it 'sets empty diff and commit ivars' do
show_request
expect(response).to be_success
expect(response).to be_successful
expect(assigns(:diffs)).to eq([])
expect(assigns(:commits)).to eq([])
end
......
......@@ -16,7 +16,7 @@ describe Projects::CycleAnalytics::EventsController do
it 'is empty' do
get_issue
expect(response).to be_success
expect(response).to be_successful
expect(JSON.parse(response.body)['events']).to be_empty
end
end
......@@ -32,7 +32,7 @@ describe Projects::CycleAnalytics::EventsController do
it 'is not empty' do
get_issue
expect(response).to be_success
expect(response).to be_successful
end
it 'contains event detais' do
......@@ -49,7 +49,7 @@ describe Projects::CycleAnalytics::EventsController do
it 'is empty' do
get_issue(additional_params: { cycle_analytics: { start_date: 7 } })
expect(response).to be_success
expect(response).to be_successful
expect(JSON.parse(response.body)['events']).to be_empty
end
......
......@@ -21,7 +21,7 @@ describe Projects::CycleAnalyticsController do
project_id: project
})
expect(response).to be_success
expect(response).to be_successful
end
end
......@@ -34,7 +34,7 @@ describe Projects::CycleAnalyticsController do
project_id: project
})
expect(response).to be_success
expect(response).to be_successful
expect(assigns(:cycle_analytics_no_data)).to eq(true)
end
end
......@@ -55,7 +55,7 @@ describe Projects::CycleAnalyticsController do
project_id: project
})
expect(response).to be_success
expect(response).to be_successful
expect(assigns(:cycle_analytics_no_data)).to eq(false)
end
end
......
......@@ -28,7 +28,7 @@ describe Projects::MergeRequests::CreationsController do
it 'renders new merge request widget template' do
get :new, params: get_diff_params
expect(response).to be_success
expect(response).to be_successful
end
end
......@@ -56,7 +56,7 @@ describe Projects::MergeRequests::CreationsController do
it 'limits total commits' do
get :new, params: large_diff_params
expect(response).to be_success
expect(response).to be_successful
total = assigns(:total_commit_count)
expect(assigns(:commits)).to be_an Array
......@@ -70,7 +70,7 @@ describe Projects::MergeRequests::CreationsController do
it 'shows total commits' do
get :new, params: large_diff_params
expect(response).to be_success
expect(response).to be_successful
total = assigns(:total_commit_count)
expect(assigns(:commits)).to be_an CommitCollection
......@@ -89,7 +89,7 @@ describe Projects::MergeRequests::CreationsController do
get :diffs, params: get_diff_params.merge(format: 'json')
expect(response).to be_success
expect(response).to be_successful
expect(assigns[:diffs]).to be_nil
end
end
......
......@@ -66,7 +66,7 @@ describe Projects::MergeRequests::DiffsController do
end
it 'renders' do
expect(response).to be_success
expect(response).to be_successful
expect(response.body).to have_content('Subproject commit')
end
end
......
......@@ -57,7 +57,7 @@ describe Projects::MergeRequestsController do
go(format: :html)
expect(response).to be_success
expect(response).to be_successful
end
end
......@@ -66,7 +66,7 @@ describe Projects::MergeRequestsController do
go(format: :html)
expect(response).to be_success
expect(response).to be_successful
end
context "that is invalid" do
......@@ -75,7 +75,7 @@ describe Projects::MergeRequestsController do
it "renders merge request page" do
go(format: :html)
expect(response).to be_success
expect(response).to be_successful
end
end
end
......@@ -124,7 +124,7 @@ describe Projects::MergeRequestsController do
it "renders merge request page" do
go(format: :json)
expect(response).to be_success
expect(response).to be_successful
end
end
end
......
......@@ -139,7 +139,7 @@ describe Projects::MilestonesController do
expect(issue.milestone_id).to eq(milestone.id)
delete :destroy, params: { namespace_id: project.namespace.id, project_id: project.id, id: milestone.iid }, format: :js
expect(response).to be_success
expect(response).to be_successful
expect(Event.recent.first.action).to eq(Event::DESTROYED)
......
......@@ -158,7 +158,7 @@ describe Projects::ProjectMembersController do
id: member
}, xhr: true
expect(response).to be_success
expect(response).to be_successful
expect(project.members).not_to include member
end
end
......
......@@ -49,7 +49,7 @@ describe Projects::RefsController do
expect(::Gitlab::GitalyClient).to receive(:allow_ref_name_caching).and_call_original
xhr_get(:js)
expect(response).to be_success
expect(response).to be_successful
end
it 'renders JSON' do
......@@ -57,7 +57,7 @@ describe Projects::RefsController do
xhr_get(:json)
expect(response).to be_success
expect(response).to be_successful
expect(json_response).to be_kind_of(Array)
end
end
......
......@@ -159,7 +159,7 @@ describe Projects::ServicesController do
context 'with approved services' do
it 'renders edit page' do
expect(response).to be_success
expect(response).to be_successful
end
end
end
......
......@@ -19,7 +19,7 @@ describe UsersController do
it 'renders the show template' do
get :show, params: { username: user.username }
expect(response).to be_success
expect(response).to be_successful
expect(response).to render_template('show')
end
end
......@@ -362,7 +362,7 @@ describe UsersController do
it 'responds with success' do
get :show, params: { username: user.username }
expect(response).to be_success
expect(response).to be_successful
end
end
......@@ -418,7 +418,7 @@ describe UsersController do
it 'responds with success' do
get :projects, params: { username: user.username }
expect(response).to be_success
expect(response).to be_successful
end
end
......
......@@ -8,7 +8,7 @@ shared_examples 'disabled when using an external authorization service' do
it 'works when the feature is not enabled' do
subject
expect(response).to be_success
expect(response).to be_successful
end
it 'renders a 404 with a message when the feature is enabled' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment