Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

fixed contract specs caused by updates from DEV branch

Jonas Jabari468a5cd24eff
diff --git a/app/contracts/queries/ical_sharing_contract.rb b/app/contracts/queries/ical_sharing_contract.rb
index b2a93c3859d..d67bf14a519 100644
--- a/app/contracts/queries/ical_sharing_contract.rb
+++ b/app/contracts/queries/ical_sharing_contract.rb
@@ -26,8 +26,10 @@
# See COPYRIGHT and LICENSE files for more details.
#++
+require 'queries/base_contract'
+
module Queries
- class ICalSharingContract < ::BaseContract
+ class ICalSharingContract < BaseContract
validate :user_allowed_to_subscribe_to_query_via_ical
protected
diff --git a/spec/contracts/queries/ical_sharing_contract_spec.rb b/spec/contracts/queries/ical_sharing_contract_spec.rb
index e783ca1ce29..4e30ecd99a7 100644
--- a/spec/contracts/queries/ical_sharing_contract_spec.rb
+++ b/spec/contracts/queries/ical_sharing_contract_spec.rb
@@ -28,11 +28,12 @@
require 'spec_helper'
require 'contracts/shared/model_contract_shared_context'
-require_relative 'shared_contract_examples'
RSpec.describe Queries::ICalSharingContract do
include_context 'ModelContract shared context'
- include_context 'with queries contract'
+
+ # using `create` approach here as many underlying checks base on
+ # real database checks which should not be mocked
let(:project) { create(:project) }
let(:query) do