summaryrefslogtreecommitdiff
path: root/spec/requests/api
diff options
context:
space:
mode:
Diffstat (limited to 'spec/requests/api')
-rw-r--r--spec/requests/api/broadcast_messages_spec.rb12
-rw-r--r--spec/requests/api/commit_statuses_spec.rb4
-rw-r--r--spec/requests/api/groups_spec.rb8
-rw-r--r--spec/requests/api/internal_spec.rb4
-rw-r--r--spec/requests/api/runners_spec.rb8
5 files changed, 18 insertions, 18 deletions
diff --git a/spec/requests/api/broadcast_messages_spec.rb b/spec/requests/api/broadcast_messages_spec.rb
index 576eb80605b..921d8714173 100644
--- a/spec/requests/api/broadcast_messages_spec.rb
+++ b/spec/requests/api/broadcast_messages_spec.rb
@@ -27,8 +27,8 @@ describe API::BroadcastMessages, api: true do
expect(response).to have_http_status(200)
expect(response).to include_pagination_headers
expect(json_response).to be_kind_of(Array)
- expect(json_response.first.keys).
- to match_array(%w(id message starts_at ends_at color font active))
+ expect(json_response.first.keys)
+ .to match_array(%w(id message starts_at ends_at color font active))
end
end
@@ -52,8 +52,8 @@ describe API::BroadcastMessages, api: true do
expect(response).to have_http_status(200)
expect(json_response['id']).to eq message.id
- expect(json_response.keys).
- to match_array(%w(id message starts_at ends_at color font active))
+ expect(json_response.keys)
+ .to match_array(%w(id message starts_at ends_at color font active))
end
end
@@ -174,8 +174,8 @@ describe API::BroadcastMessages, api: true do
end
it 'deletes the broadcast message for admins' do
- expect { delete api("/broadcast_messages/#{message.id}", admin) }.
- to change { BroadcastMessage.count }.by(-1)
+ expect { delete api("/broadcast_messages/#{message.id}", admin) }
+ .to change { BroadcastMessage.count }.by(-1)
end
end
end
diff --git a/spec/requests/api/commit_statuses_spec.rb b/spec/requests/api/commit_statuses_spec.rb
index eface28976e..81a8856b8f1 100644
--- a/spec/requests/api/commit_statuses_spec.rb
+++ b/spec/requests/api/commit_statuses_spec.rb
@@ -207,8 +207,8 @@ describe API::CommitStatuses, api: true do
it 'responds with bad request status and validation errors' do
expect(response).to have_http_status(400)
- expect(json_response['message']['target_url']).
- to include 'must be a valid URL'
+ expect(json_response['message']['target_url'])
+ .to include 'must be a valid URL'
end
end
end
diff --git a/spec/requests/api/groups_spec.rb b/spec/requests/api/groups_spec.rb
index b82372b1b60..9c3a92bedbd 100644
--- a/spec/requests/api/groups_spec.rb
+++ b/spec/requests/api/groups_spec.rb
@@ -36,8 +36,8 @@ describe API::Groups, api: true do
expect(response).to include_pagination_headers
expect(json_response).to be_an Array
expect(json_response.length).to eq(1)
- expect(json_response).
- to satisfy_one { |group| group['name'] == group1.name }
+ expect(json_response)
+ .to satisfy_one { |group| group['name'] == group1.name }
end
it "does not include statistics" do
@@ -84,8 +84,8 @@ describe API::Groups, api: true do
expect(response).to have_http_status(200)
expect(response).to include_pagination_headers
expect(json_response).to be_an Array
- expect(json_response).
- to satisfy_one { |group| group['statistics'] == attributes }
+ expect(json_response)
+ .to satisfy_one { |group| group['statistics'] == attributes }
end
end
diff --git a/spec/requests/api/internal_spec.rb b/spec/requests/api/internal_spec.rb
index d1e765d1fdd..ffeacb15f17 100644
--- a/spec/requests/api/internal_spec.rb
+++ b/spec/requests/api/internal_spec.rb
@@ -74,8 +74,8 @@ describe API::Internal, api: true do
context 'when two-factor is enabled' do
it 'returns new recovery codes when the user exists' do
allow_any_instance_of(User).to receive(:two_factor_enabled?).and_return(true)
- allow_any_instance_of(User).
- to receive(:generate_otp_backup_codes!).and_return(%w(119135e5a3ebce8e 34bd7b74adbc8861))
+ allow_any_instance_of(User)
+ .to receive(:generate_otp_backup_codes!).and_return(%w(119135e5a3ebce8e 34bd7b74adbc8861))
post api('/internal/two_factor_recovery_codes'),
secret_token: secret_token,
diff --git a/spec/requests/api/runners_spec.rb b/spec/requests/api/runners_spec.rb
index 2e596f4197e..103d6755888 100644
--- a/spec/requests/api/runners_spec.rb
+++ b/spec/requests/api/runners_spec.rb
@@ -202,8 +202,8 @@ describe API::Runners, api: true do
expect(shared_runner.tag_list).to include('ruby2.1', 'pgsql', 'mysql')
expect(shared_runner.run_untagged?).to be(false)
expect(shared_runner.locked?).to be(true)
- expect(shared_runner.ensure_runner_queue_value).
- not_to eq(runner_queue_value)
+ expect(shared_runner.ensure_runner_queue_value)
+ .not_to eq(runner_queue_value)
end
end
@@ -218,8 +218,8 @@ describe API::Runners, api: true do
expect(response).to have_http_status(200)
expect(specific_runner.description).to eq('test')
expect(specific_runner.description).not_to eq(description)
- expect(specific_runner.ensure_runner_queue_value).
- not_to eq(runner_queue_value)
+ expect(specific_runner.ensure_runner_queue_value)
+ .not_to eq(runner_queue_value)
end
end