summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorSteven Thonus <steven@ln2.nl>2013-11-29 17:10:59 +0100
committerSteven Thonus <steven@ln2.nl>2013-12-16 14:39:14 +0100
commit37383966ef3fada865d3d21a8ce7a3c640bbd11e (patch)
treec7fe9015cd5d3b336e868498bb478fd523de0a86 /spec
parent99490159e5f9d6ff4b45f78b977d01caa1e3c4fc (diff)
downloadgitlab-ce-37383966ef3fada865d3d21a8ce7a3c640bbd11e.tar.gz
Archiving old projects; archived projects aren't shown on dashboard
features for archive projects abilities for archived project other abilities for archive projects only limit commits and merges for archived projects ability changed to prohibited actions on archived projects added spec and feature tests for archive projects changed search bar not to include archived projects
Diffstat (limited to 'spec')
-rw-r--r--spec/models/project_spec.rb1
-rw-r--r--spec/requests/api/internal_spec.rb27
2 files changed, 28 insertions, 0 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index 1e05d188234..8aa4c7fed1a 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -21,6 +21,7 @@
# imported :boolean default(FALSE), not null
# import_url :string(255)
# visibility_level :integer default(0), not null
+# archived :boolean default(FALSE), not null
#
require 'spec_helper'
diff --git a/spec/requests/api/internal_spec.rb b/spec/requests/api/internal_spec.rb
index e8870f4d5d8..5f6dff92c0a 100644
--- a/spec/requests/api/internal_spec.rb
+++ b/spec/requests/api/internal_spec.rb
@@ -103,6 +103,33 @@ describe API::API do
end
end
+ context "archived project" do
+ let(:personal_project) { create(:project, namespace: user.namespace) }
+
+ before do
+ project.team << [user, :developer]
+ project.archive!
+ end
+
+ context "git pull" do
+ it do
+ pull(key, project)
+
+ response.status.should == 200
+ response.body.should == 'true'
+ end
+ end
+
+ context "git push" do
+ it do
+ push(key, project)
+
+ response.status.should == 200
+ response.body.should == 'false'
+ end
+ end
+ end
+
context "deploy key" do
let(:key) { create(:deploy_key) }