summaryrefslogtreecommitdiff
path: root/spec/routing/environments_spec.rb
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2019-02-28 19:57:34 +0100
committerToon Claes <toon@gitlab.com>2019-02-28 19:57:34 +0100
commit62d7990b9bb30cf33ed87017c5c633d1cccc75c2 (patch)
treec3e1b69c58a412ba1c6f50a0337a23d9f9d6e1a4 /spec/routing/environments_spec.rb
parentf6453eca992a9c142268e78ac782cef98110d183 (diff)
downloadgitlab-ce-tc-standard-gem.tar.gz
Ran standardrb --fix on the whole codebasetc-standard-gem
Inspired by https://twitter.com/searls/status/1101137953743613952 I decided to try https://github.com/testdouble/standard on our codebase. It's opinionated, but at least it's a _standard_.
Diffstat (limited to 'spec/routing/environments_spec.rb')
-rw-r--r--spec/routing/environments_spec.rb38
1 files changed, 19 insertions, 19 deletions
diff --git a/spec/routing/environments_spec.rb b/spec/routing/environments_spec.rb
index aacbe300966..a6843c557f5 100644
--- a/spec/routing/environments_spec.rb
+++ b/spec/routing/environments_spec.rb
@@ -1,36 +1,36 @@
-require 'spec_helper'
+require "spec_helper"
-describe 'environments routing' do
+describe "environments routing" do
let(:project) { create(:project) }
let(:environment) do
create(:environment, project: project,
- name: 'staging-1.0/review')
+ name: "staging-1.0/review")
end
let(:environments_route) do
"#{project.namespace.name}/#{project.name}/environments/"
end
- describe 'routing environment folders' do
- context 'when using JSON format' do
- it 'correctly matches environment name and JSON format' do
- expect(get_folder('staging-1.0.json'))
- .to route_to(*folder_action(id: 'staging-1.0', format: 'json'))
+ describe "routing environment folders" do
+ context "when using JSON format" do
+ it "correctly matches environment name and JSON format" do
+ expect(get_folder("staging-1.0.json"))
+ .to route_to(*folder_action(id: "staging-1.0", format: "json"))
end
end
- context 'when using HTML format' do
- it 'correctly matches environment name and HTML format' do
- expect(get_folder('staging-1.0.html'))
- .to route_to(*folder_action(id: 'staging-1.0', format: 'html'))
+ context "when using HTML format" do
+ it "correctly matches environment name and HTML format" do
+ expect(get_folder("staging-1.0.html"))
+ .to route_to(*folder_action(id: "staging-1.0", format: "html"))
end
end
- context 'when using implicit format' do
- it 'correctly matches environment name' do
- expect(get_folder('staging-1.0'))
- .to route_to(*folder_action(id: 'staging-1.0'))
+ context "when using implicit format" do
+ it "correctly matches environment name" do
+ expect(get_folder("staging-1.0"))
+ .to route_to(*folder_action(id: "staging-1.0"))
end
end
end
@@ -41,9 +41,9 @@ describe 'environments routing' do
end
def folder_action(**opts)
- options = { namespace_id: project.namespace.name,
- project_id: project.name }
+ options = {namespace_id: project.namespace.name,
+ project_id: project.name,}
- ['projects/environments#folder', options.merge(opts)]
+ ["projects/environments#folder", options.merge(opts)]
end
end