diff options
Diffstat (limited to 'spec/models/work_item_spec.rb')
-rw-r--r-- | spec/models/work_item_spec.rb | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/spec/models/work_item_spec.rb b/spec/models/work_item_spec.rb index 476d346db10..68e9e8ee50d 100644 --- a/spec/models/work_item_spec.rb +++ b/spec/models/work_item_spec.rb @@ -17,6 +17,13 @@ RSpec.describe WorkItem, feature_category: :portfolio_management do .with_foreign_key('work_item_id') end + it 'has one `dates_source`' do + is_expected.to have_one(:dates_source) + .class_name('WorkItems::DatesSource') + .with_foreign_key('issue_id') + .inverse_of(:work_item) + end + it 'has many `work_item_children`' do is_expected.to have_many(:work_item_children) .class_name('WorkItem') @@ -79,16 +86,6 @@ RSpec.describe WorkItem, feature_category: :portfolio_management do end end - describe '.in_namespaces' do - let(:group) { create(:group) } - let!(:group_work_item) { create(:work_item, namespace: group) } - let!(:project_work_item) { create(:work_item, project: reusable_project) } - - subject { described_class.in_namespaces(group) } - - it { is_expected.to contain_exactly(group_work_item) } - end - describe '.with_confidentiality_check' do let(:user) { create(:user) } let!(:authored_work_item) { create(:work_item, :confidential, project: reusable_project, author: user) } |