This instance will be upgraded to Heptapod 0.31.0 on 2022-05-19 at 11:00 UTC+2 (a few minutes of down time)

Commit 713178f0 authored by Thong Kuah's avatar Thong Kuah Committed by James Lopez
Browse files

Autocorrect with RSpec/ExampleWording cop

- rewords examples starting with 'should'
- rewords examples starting with 'it'

Note: I had to manually fixup "onlies" to "only"
parent 63563a0f7570
......@@ -3,7 +3,7 @@
describe ObjectStoreSettings do
describe '.parse' do
it 'should set correct default values' do
it 'sets correct default values' do
settings = described_class.parse(nil)
expect(settings['enabled']).to be false
......
......@@ -75,7 +75,7 @@ def view_milestone
expect(response.body).not_to include(project_milestone.title)
end
it 'should show counts of group and project milestones to which the user belongs to' do
it 'shows counts of group and project milestones to which the user belongs to' do
get :index
expect(response.body).to include("Open\n<span class=\"badge badge-pill\">2</span>")
......
......@@ -455,7 +455,7 @@ def go(format: :html)
context 'when domain is invalid' do
let(:domain) { 'http://not-a-valid-domain' }
it 'should not update cluster attributes' do
it 'does not update cluster attributes' do
go
cluster.reload
......
......@@ -124,7 +124,7 @@
end
context 'when explicitly enabling auto devops' do
it 'should update group attribute' do
it 'updates group attribute' do
expect(group.auto_devops_enabled).to eq(true)
end
end
......@@ -132,7 +132,7 @@
context 'when explicitly disabling auto devops' do
let(:auto_devops_param) { '0' }
it 'should update group attribute' do
it 'updates group attribute' do
expect(group.auto_devops_enabled).to eq(false)
end
end
......
......@@ -566,11 +566,11 @@ def group_moved_message(redirect_route, group)
}
end
it 'should return a notice' do
it 'returns a notice' do
expect(flash[:notice]).to eq("Group '#{group.name}' was successfully transferred.")
end
it 'should redirect to the new path' do
it 'redirects to the new path' do
expect(response).to redirect_to("/#{new_parent_group.path}/#{group.path}")
end
end
......@@ -587,11 +587,11 @@ def group_moved_message(redirect_route, group)
}
end
it 'should return a notice' do
it 'returns a notice' do
expect(flash[:notice]).to eq("Group '#{group.name}' was successfully transferred.")
end
it 'should redirect to the new path' do
it 'redirects to the new path' do
expect(response).to redirect_to("/#{group.path}")
end
end
......@@ -611,11 +611,11 @@ def group_moved_message(redirect_route, group)
}
end
it 'should return an alert' do
it 'returns an alert' do
expect(flash[:alert]).to eq "Transfer failed: namespace directory cannot be moved"
end
it 'should redirect to the current path' do
it 'redirects to the current path' do
expect(response).to redirect_to(edit_group_path(group))
end
end
......@@ -633,7 +633,7 @@ def group_moved_message(redirect_route, group)
}
end
it 'should be denied' do
it 'is denied' do
expect(response).to have_gitlab_http_status(404)
end
end
......
......@@ -55,7 +55,7 @@ def stub_route_as(path)
allow(@routes).to receive(:generate_extras) { [path, []] }
end
it 'it calls through to the failure handler' do
it 'calls through to the failure handler' do
request.env['omniauth.error'] = OneLogin::RubySaml::ValidationError.new("Fingerprint mismatch")
request.env['omniauth.error.strategy'] = OmniAuth::Strategies::SAML.new(nil)
stub_route_as('/users/auth/saml/callback')
......
......@@ -285,7 +285,7 @@ def blob_after_edit_path
merge_request.update!(source_project: other_project, target_project: other_project)
end
it "it redirect to blob" do
it "redirects to blob" do
put :update, params: mr_params
expect(response).to redirect_to(blob_after_edit_path)
......
......@@ -16,15 +16,15 @@
get :show, params: { namespace_id: project.namespace, project_id: project }
end
it 'should be success' do
it 'is success' do
expect(response).to be_success
end
it 'should render show page' do
it 'renders show page' do
expect(response).to render_template :show
end
it 'should retrieve project' do
it 'retrieves project' do
expect(assigns(:project)).to eq(project)
end
end
......@@ -36,7 +36,7 @@
get :show, params: { namespace_id: project.namespace, project_id: project }
end
it 'should respond with 404' do
it 'responds with 404' do
expect(response).to have_gitlab_http_status(404)
end
end
......@@ -74,7 +74,7 @@
post :create, params: { namespace_id: project.namespace, project_id: project, content: content }
end
it 'should be success' do
it 'is success' do
expect(response).to be_success
end
......@@ -82,7 +82,7 @@
expect(response).to render_template :show
end
it 'should retrieve project' do
it 'retrieves project' do
expect(assigns(:project)).to eq(project)
end
end
......@@ -102,7 +102,7 @@
post :create, params: { namespace_id: project.namespace, project_id: project, content: content }
end
it 'should assign errors' do
it 'assigns errors' do
expect(assigns[:error]).to eq('jobs:rubocop config contains unknown keys: scriptt')
end
end
......@@ -114,7 +114,7 @@
post :create, params: { namespace_id: project.namespace, project_id: project, content: content }
end
it 'should respond with 404' do
it 'responds with 404' do
expect(response).to have_gitlab_http_status(404)
end
end
......
......@@ -15,7 +15,7 @@
describe "GET commits_root" do
context "no ref is provided" do
it 'should redirect to the default branch of the project' do
it 'redirects to the default branch of the project' do
get(:commits_root,
params: {
namespace_id: project.namespace,
......
......@@ -65,7 +65,7 @@
expect(flash[:notice]).to match(/successfully updated/)
end
it 'should create a RemoteMirror object' do
it 'creates a RemoteMirror object' do
expect { do_put(project, remote_mirrors_attributes: remote_mirror_attributes) }.to change(RemoteMirror, :count).by(1)
end
end
......@@ -82,7 +82,7 @@
expect(flash[:alert]).to match(/Only allowed protocols are/)
end
it 'should not create a RemoteMirror object' do
it 'does not create a RemoteMirror object' do
expect { do_put(project, remote_mirrors_attributes: remote_mirror_attributes) }.not_to change(RemoteMirror, :count)
end
end
......
......@@ -5,7 +5,7 @@
let(:project) { create(:project, :public, :access_requestable) }
describe 'GET index' do
it 'should have the project_members address with a 200 status code' do
it 'has the project_members address with a 200 status code' do
get :index, params: { namespace_id: project.namespace, project_id: project }
expect(response).to have_gitlab_http_status(200)
......
......@@ -147,7 +147,7 @@ def do_put
params: { namespace_id: project.namespace, project_id: project, id: service.to_param, service: { namespace: 'updated_namespace' } }
end
it 'should not update the service' do
it 'does not update the service' do
service.reload
expect(service.namespace).not_to eq('updated_namespace')
end
......@@ -172,7 +172,7 @@ def do_put
context 'with approved services' do
let(:service_id) { 'jira' }
it 'should render edit page' do
it 'renders edit page' do
expect(response).to be_success
end
end
......@@ -180,7 +180,7 @@ def do_put
context 'with a deprecated service' do
let(:service_id) { 'kubernetes' }
it 'should render edit page' do
it 'renders edit page' do
expect(response).to be_success
end
end
......
......@@ -14,11 +14,11 @@
let(:feature_name) { UserCallout.feature_names.keys.first }
context 'when callout entry does not exist' do
it 'should create a callout entry with dismissed state' do
it 'creates a callout entry with dismissed state' do
expect { subject }.to change { UserCallout.count }.by(1)
end
it 'should return success' do
it 'returns success' do
subject
expect(response).to have_gitlab_http_status(:ok)
......@@ -28,7 +28,7 @@
context 'when callout entry already exists' do
let!(:callout) { create(:user_callout, feature_name: UserCallout.feature_names.keys.first, user: user) }
it 'should return success' do
it 'returns success' do
subject
expect(response).to have_gitlab_http_status(:ok)
......@@ -39,7 +39,7 @@
context 'with invalid feature name' do
let(:feature_name) { 'bogus_feature_name' }
it 'should return bad request' do
it 'returns bad request' do
subject
expect(response).to have_gitlab_http_status(:bad_request)
......
......@@ -34,7 +34,7 @@ def file_container(filename)
define_method(file.split('.').first) { file_container(file) }
end
it 'should show the diff content with a highlighted line when linking to line' do
it 'shows the diff content with a highlighted line when linking to line' do
expect(large_diff).not_to have_selector('.code')
expect(large_diff).to have_selector('.nothing-here-block')
......@@ -48,7 +48,7 @@ def file_container(filename)
expect(large_diff).to have_selector('.hll')
end
it 'should show the diff content when linking to file' do
it 'shows the diff content when linking to file' do
expect(large_diff).not_to have_selector('.code')
expect(large_diff).to have_selector('.nothing-here-block')
......
......@@ -68,17 +68,17 @@
end
describe 'landing component' do
it 'should show a landing component' do
it 'shows a landing component' do
expect(page).to have_content('Below you will find all the groups that are public.')
end
it 'should be dismissable' do
it 'is dismissable' do
find('.dismiss-button').click
expect(page).not_to have_content('Below you will find all the groups that are public.')
end
it 'should persistently not show once dismissed' do
it 'does not show persistently once dismissed' do
find('.dismiss-button').click
visit explore_groups_path
......
......@@ -43,7 +43,7 @@
end
context 'as owner first visiting group settings' do
it 'should see instance enabled badge' do
it 'sees instance enabled badge' do
visit group_settings_ci_cd_path(group)
page.within '#auto-devops-settings' do
......@@ -53,7 +53,7 @@
end
context 'when Auto DevOps group has been enabled' do
it 'should see group enabled badge' do
it 'sees group enabled badge' do
group.update!(auto_devops_enabled: true)
visit group_settings_ci_cd_path(group)
......@@ -65,7 +65,7 @@
end
context 'when Auto DevOps group has been disabled' do
it 'should not see a badge' do
it 'does not see a badge' do
group.update!(auto_devops_enabled: false)
visit group_settings_ci_cd_path(group)
......
......@@ -237,7 +237,7 @@
let!(:project) { create(:project, namespace: group) }
let!(:path) { group_path(group) }
it 'it renders projects and groups on the page' do
it 'renders projects and groups on the page' do
visit path
wait_for_requests
......
......@@ -82,15 +82,15 @@
visit help_path
end
it 'should display custom help page text' do
it 'displays custom help page text' do
expect(page).to have_text "My Custom Text"
end
it 'should hide marketing content when enabled' do
it 'hides marketing content when enabled' do
expect(page).not_to have_link "Get a support subscription"
end
it 'should use a custom support url' do
it 'uses a custom support url' do
expect(page).to have_link "See our website for getting help", href: "http://example.com/help"
end
end
......
......@@ -42,7 +42,7 @@ def click_assignee(text)
expect(page).to have_css(js_dropdown_assignee, visible: false)
end
it 'should show loading indicator when opened' do
it 'shows loading indicator when opened' do
slow_requests do
# We aren't using `input_filtered_search` because we want to see the loading indicator
filtered_search.set('assignee:')
......@@ -51,13 +51,13 @@ def click_assignee(text)
end
end
it 'should hide loading indicator when loaded' do
it 'hides loading indicator when loaded' do
input_filtered_search('assignee:', submit: false, extra_space: false)
expect(find(js_dropdown_assignee)).not_to have_css('.filter-dropdown-loading')
end
it 'should load all the assignees when opened' do
it 'loads all the assignees when opened' do
input_filtered_search('assignee:', submit: false, extra_space: false)
expect(dropdown_assignee_size).to eq(4)
......
......@@ -50,7 +50,7 @@ def click_author(text)
expect(page).to have_css(js_dropdown_author, visible: false)
end
it 'should show loading indicator when opened' do
it 'shows loading indicator when opened' do
slow_requests do
filtered_search.set('author:')
......@@ -58,13 +58,13 @@ def click_author(text)
end
end
it 'should hide loading indicator when loaded' do
it 'hides loading indicator when loaded' do
send_keys_to_filtered_search('author:')
expect(page).not_to have_css('#js-dropdown-author .filter-dropdown-loading')
end
it 'should load all the authors when opened' do
it 'loads all the authors when opened' do
send_keys_to_filtered_search('author:')
expect(dropdown_author_size).to eq(4)
......
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