diff options
Diffstat (limited to 'spec/services/design_management')
3 files changed, 4 insertions, 1 deletions
diff --git a/spec/services/design_management/copy_design_collection/copy_service_spec.rb b/spec/services/design_management/copy_design_collection/copy_service_spec.rb index ddbed91815f..03242487b53 100644 --- a/spec/services/design_management/copy_design_collection/copy_service_spec.rb +++ b/spec/services/design_management/copy_design_collection/copy_service_spec.rb @@ -7,6 +7,7 @@ RSpec.describe DesignManagement::CopyDesignCollection::CopyService, :clean_gitla let_it_be(:user) { create(:user) } let_it_be(:project) { create(:project) } let_it_be(:issue, refind: true) { create(:issue, project: project) } + let(:target_issue) { create(:issue) } subject { described_class.new(project, user, issue: issue, target_issue: target_issue).execute } diff --git a/spec/services/design_management/delete_designs_service_spec.rb b/spec/services/design_management/delete_designs_service_spec.rb index ed161b4c8ff..341f71fa62c 100644 --- a/spec/services/design_management/delete_designs_service_spec.rb +++ b/spec/services/design_management/delete_designs_service_spec.rb @@ -7,6 +7,7 @@ RSpec.describe DesignManagement::DeleteDesignsService do let_it_be(:project) { create(:project) } let_it_be(:issue) { create(:issue, project: project) } let_it_be(:user) { create(:user) } + let(:designs) { create_designs } subject(:service) { described_class.new(project, user, issue: issue, designs: designs) } diff --git a/spec/services/design_management/save_designs_service_spec.rb b/spec/services/design_management/save_designs_service_spec.rb index f36e68c8dbd..5bc763cc95e 100644 --- a/spec/services/design_management/save_designs_service_spec.rb +++ b/spec/services/design_management/save_designs_service_spec.rb @@ -7,6 +7,7 @@ RSpec.describe DesignManagement::SaveDesignsService do let_it_be_with_reload(:issue) { create(:issue) } let_it_be(:developer) { create(:user, developer_projects: [issue.project]) } + let(:project) { issue.project } let(:user) { developer } let(:files) { [rails_sample] } @@ -309,7 +310,7 @@ RSpec.describe DesignManagement::SaveDesignsService do end context 'when the user is not allowed to upload designs' do - let(:user) { build_stubbed(:user) } + let(:user) { build_stubbed(:user, id: non_existing_record_id) } it_behaves_like 'a service error' end |