diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-10-05 11:47:32 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-10-05 14:12:40 +0300 |
commit | b3acd5459c08f61b82799821ae09f17f4dcfec10 (patch) | |
tree | d6c5e096e67a6f53fbbc33775213cc3a06eec04a /spec/models/project_spec.rb | |
parent | e013d39875bbf5f6e11fda627a8dab045023d59e (diff) |
Use `alias_attribute` & `alias_method` to define parent-methods
Diffstat (limited to 'spec/models/project_spec.rb')
-rw-r--r-- | spec/models/project_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 176bb568cbe..def2e0983ac 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -2095,6 +2095,13 @@ describe Project do it { expect(project.parent).to eq(project.namespace) } end + describe '#parent_id' do + let(:project) { create(:project) } + + it { expect(project.parent_id).to eq(project.namespace_id) } + end + + describe '#parent_changed?' do let(:project) { create(:project) } |