summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-11-29 07:29:11 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-11-29 12:39:03 +0200
commiteb1004f7890d25a86beb0ca0a7eca802d9fce665 (patch)
tree94cb713c0628542e646aad323be4d88fb1c356e3 /spec
parenta1ffc673b95f4d0e2316d461f1364fa1ee08e9d2 (diff)
downloadgitlab-ce-eb1004f7890d25a86beb0ca0a7eca802d9fce665.tar.gz
Refactor abilities. Added ProjectUpdate context. Fixed few bugs with namespaces
Diffstat (limited to 'spec')
-rw-r--r--spec/models/group_spec.rb2
-rw-r--r--spec/models/namespace_spec.rb3
2 files changed, 3 insertions, 2 deletions
diff --git a/spec/models/group_spec.rb b/spec/models/group_spec.rb
index 884726266cb..108bc303540 100644
--- a/spec/models/group_spec.rb
+++ b/spec/models/group_spec.rb
@@ -24,7 +24,7 @@ describe Group do
it { should validate_presence_of :owner }
describe :users do
- it { group.users.should == [] }
+ it { group.users.should == [group.owner] }
end
describe :human_name do
diff --git a/spec/models/namespace_spec.rb b/spec/models/namespace_spec.rb
index 1f1d66150fb..d0de4a7b7fb 100644
--- a/spec/models/namespace_spec.rb
+++ b/spec/models/namespace_spec.rb
@@ -55,9 +55,10 @@ describe Namespace do
describe :move_dir do
before do
@namespace = create :namespace
+ @namespace.stub(path_changed?: true)
end
- it "should raise error when called directly" do
+ it "should raise error when dirtory exists" do
expect { @namespace.move_dir }.to raise_error("Already exists")
end