summaryrefslogtreecommitdiff
path: root/spec/requests
diff options
context:
space:
mode:
authorValery Sizov <valery@gitlab.com>2016-08-11 18:30:18 +0300
committerJames Edwards-Jones <jedwardsjones@gitlab.com>2017-02-01 22:45:41 +0000
commitceb1ebd9590aaddc96cc059735bcf571464a8460 (patch)
tree1f7a4ade7c6c54dbddce3e9054cf97cf9a5d7f83 /spec/requests
parent659cceb0e8694b58a8b665de3f338245244ef114 (diff)
downloadgitlab-ce-ceb1ebd9590aaddc96cc059735bcf571464a8460.tar.gz
Active tense test coveragejej-backport-active-tense-specs
Ports changes from https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/642 back into CE
Diffstat (limited to 'spec/requests')
-rw-r--r--spec/requests/api/builds_spec.rb2
-rw-r--r--spec/requests/api/groups_spec.rb8
-rw-r--r--spec/requests/api/projects_spec.rb2
-rw-r--r--spec/requests/ci/api/builds_spec.rb4
4 files changed, 8 insertions, 8 deletions
diff --git a/spec/requests/api/builds_spec.rb b/spec/requests/api/builds_spec.rb
index 645e36683bc..bd6e23ee769 100644
--- a/spec/requests/api/builds_spec.rb
+++ b/spec/requests/api/builds_spec.rb
@@ -67,7 +67,7 @@ describe API::Builds, api: true do
context 'unauthorized user' do
let(:api_user) { nil }
- it 'should not return project builds' do
+ it 'does not return project builds' do
expect(response).to have_http_status(401)
end
end
diff --git a/spec/requests/api/groups_spec.rb b/spec/requests/api/groups_spec.rb
index 1187d2e609d..a027c23bb88 100644
--- a/spec/requests/api/groups_spec.rb
+++ b/spec/requests/api/groups_spec.rb
@@ -326,7 +326,7 @@ describe API::Groups, api: true do
expect(response).to have_http_status(404)
end
- it "should only return projects to which user has access" do
+ it "only returns projects to which user has access" do
project3.team << [user3, :developer]
get api("/groups/#{group1.id}/projects", user3)
@@ -338,7 +338,7 @@ describe API::Groups, api: true do
end
context "when authenticated as admin" do
- it "should return any existing group" do
+ it "returns any existing group" do
get api("/groups/#{group2.id}/projects", admin)
expect(response).to have_http_status(200)
@@ -346,7 +346,7 @@ describe API::Groups, api: true do
expect(json_response.first['name']).to eq(project2.name)
end
- it "should not return a non existing group" do
+ it "does not return a non existing group" do
get api("/groups/1328/projects", admin)
expect(response).to have_http_status(404)
@@ -354,7 +354,7 @@ describe API::Groups, api: true do
end
context 'when using group path in URL' do
- it 'should return any existing group' do
+ it 'returns any existing group' do
get api("/groups/#{group1.path}/projects", admin)
expect(response).to have_http_status(200)
diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb
index a1db81ce18c..753dde0ca3a 100644
--- a/spec/requests/api/projects_spec.rb
+++ b/spec/requests/api/projects_spec.rb
@@ -459,7 +459,7 @@ describe API::Projects, api: true do
before { project }
before { admin }
- it 'should create new project without path and return 201' do
+ it 'creates new project without path and return 201' do
expect { post api("/projects/user/#{user.id}", admin), name: 'foo' }.to change {Project.count}.by(1)
expect(response).to have_http_status(201)
end
diff --git a/spec/requests/ci/api/builds_spec.rb b/spec/requests/ci/api/builds_spec.rb
index 8dbe5f0b025..1cedaa4ba63 100644
--- a/spec/requests/ci/api/builds_spec.rb
+++ b/spec/requests/ci/api/builds_spec.rb
@@ -458,7 +458,7 @@ describe Ci::API::Builds do
before { build.run! }
describe "POST /builds/:id/artifacts/authorize" do
- context "should authorize posting artifact to running build" do
+ context "authorizes posting artifact to running build" do
it "using token as parameter" do
post authorize_url, { token: build.token }, headers
@@ -492,7 +492,7 @@ describe Ci::API::Builds do
end
end
- context "should fail to post too large artifact" do
+ context "fails to post too large artifact" do
it "using token as parameter" do
stub_application_setting(max_artifacts_size: 0)