summaryrefslogtreecommitdiff
path: root/spec/models/project_spec.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-08-13 12:24:10 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-08-13 12:24:10 +0300
commit7825830ca51dc7bf84ca6216c3b66e3ce1c63c44 (patch)
tree17f05aaab8b6178ce20213447f3cea64722dceed /spec/models/project_spec.rb
parenta36195bd2853bfef1b6883eef64334767e12fcf1 (diff)
downloadgitlab-ce-7825830ca51dc7bf84ca6216c3b66e3ce1c63c44.tar.gz
Allow project name, path etc start with number. Fixed specs
Diffstat (limited to 'spec/models/project_spec.rb')
-rw-r--r--spec/models/project_spec.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index 65acf0c2498..05a54f760f1 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -68,9 +68,10 @@ describe Project do
it { should ensure_length_of(:issues_tracker_id).is_within(0..255) }
it "should not allow new projects beyond user limits" do
- project.stub(:creator).and_return(double(can_create_project?: false, projects_limit: 1))
- project.should_not be_valid
- project.errors[:limit_reached].first.should match(/Your own projects limit is 1/)
+ project2 = build(:project)
+ project2.stub(:creator).and_return(double(can_create_project?: false, projects_limit: 0))
+ project2.should_not be_valid
+ project2.errors[:limit_reached].first.should match(/Your own projects limit is 0/)
end
end