summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/group_spec.rb4
-rw-r--r--spec/models/namespace_spec.rb4
-rw-r--r--spec/models/project_spec.rb7
3 files changed, 6 insertions, 9 deletions
diff --git a/spec/models/group_spec.rb b/spec/models/group_spec.rb
index 6ae2cb20169..3a748b88d18 100644
--- a/spec/models/group_spec.rb
+++ b/spec/models/group_spec.rb
@@ -18,7 +18,7 @@ describe Group do
it { should have_many :projects }
it { should validate_presence_of :name }
it { should validate_uniqueness_of(:name) }
- it { should validate_presence_of :code }
- it { should validate_uniqueness_of(:code) }
+ it { should validate_presence_of :path }
+ it { should validate_uniqueness_of(:path) }
it { should validate_presence_of :owner }
end
diff --git a/spec/models/namespace_spec.rb b/spec/models/namespace_spec.rb
index ce97d01a116..f481363f90d 100644
--- a/spec/models/namespace_spec.rb
+++ b/spec/models/namespace_spec.rb
@@ -6,7 +6,7 @@ describe Namespace do
it { should have_many :projects }
it { should validate_presence_of :name }
it { should validate_uniqueness_of(:name) }
- it { should validate_presence_of :code }
- it { should validate_uniqueness_of(:code) }
+ it { should validate_presence_of :path }
+ it { should validate_uniqueness_of(:path) }
it { should validate_presence_of :owner }
end
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index dda9eefaa45..74c0aed6634 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -59,9 +59,6 @@ describe Project do
it { should ensure_length_of(:description).is_within(0..2000) }
- it { should validate_presence_of(:code) }
- it { should validate_uniqueness_of(:code) }
- it { should ensure_length_of(:code).is_within(1..255) }
# TODO: Formats
it { should validate_presence_of(:owner) }
@@ -152,7 +149,7 @@ describe Project do
end
it "returns the full web URL for this repo" do
- project = Project.new(code: "somewhere")
+ project = Project.new(path: "somewhere")
project.web_url.should == "#{Gitlab.config.url}/somewhere"
end
@@ -163,7 +160,7 @@ describe Project do
end
it "should be invalid repo" do
- project = Project.new(name: "ok_name", path: "/INVALID_PATH/", code: "NEOK")
+ project = Project.new(name: "ok_name", path: "/INVALID_PATH/", path: "NEOK")
project.valid_repo?.should be_false
end
end