Commit 5c83d3af authored by Z.J. van de Weg's avatar Z.J. van de Weg

Improve test wording

parent 2792695c
require 'spec_helper' require 'spec_helper'
describe Projects::EnvironmentsController do describe Projects::EnvironmentsController do
let(:user) { create(:user) } set(:user) { create(:user) }
let(:project) { create(:empty_project) } set(:project) { create(:empty_project) }
let(:environment) do set(:environment) do
create(:environment, name: 'production', project: project) create(:environment, name: 'production', project: project)
end end
before do before do
project.team << [user, :master] project.add_master(user)
sign_in(user) sign_in(user)
end end
describe 'GET index' do describe 'GET index' do
context 'when standardrequest has been made' do context 'when a request for the HTML is made' do
it 'responds with status code 200' do it 'responds with status code 200' do
get :index, environment_params get :index, environment_params
expect(response).to be_ok expect(response).to have_http_status(:ok)
end end
end end
...@@ -101,7 +101,7 @@ describe Projects::EnvironmentsController do ...@@ -101,7 +101,7 @@ describe Projects::EnvironmentsController do
end end
context 'when using JSON format' do context 'when using JSON format' do
it 'responds with with a sorted JSON' do it 'sorts the subfolders lexicographically' do
get :folder, namespace_id: project.namespace, get :folder, namespace_id: project.namespace,
project_id: project, project_id: project,
id: 'staging-1.0', id: 'staging-1.0',
......
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