Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/user_interacted_project_spec.rb')
-rw-r--r--spec/models/user_interacted_project_spec.rb17
1 files changed, 1 insertions, 16 deletions
diff --git a/spec/models/user_interacted_project_spec.rb b/spec/models/user_interacted_project_spec.rb
index e2c485343ae..83c66bf1969 100644
--- a/spec/models/user_interacted_project_spec.rb
+++ b/spec/models/user_interacted_project_spec.rb
@@ -8,7 +8,7 @@ describe UserInteractedProject do
let(:event) { build(:event) }
- Event::ACTIONS.each do |action|
+ Event.actions.each_key do |action|
context "for all actions (event types)" do
let(:event) { build(:event, action: action) }
@@ -44,21 +44,6 @@ describe UserInteractedProject do
end
end
- describe '.available?' do
- before do
- described_class.instance_variable_set('@available_flag', nil)
- end
-
- it 'checks schema version and properly caches positive result' do
- expect(ActiveRecord::Migrator).to receive(:current_version).and_return(described_class::REQUIRED_SCHEMA_VERSION - 1 - rand(1000))
- expect(described_class.available?).to be_falsey
- expect(ActiveRecord::Migrator).to receive(:current_version).and_return(described_class::REQUIRED_SCHEMA_VERSION + rand(1000))
- expect(described_class.available?).to be_truthy
- expect(ActiveRecord::Migrator).not_to receive(:current_version)
- expect(described_class.available?).to be_truthy # cached response
- end
- end
-
it { is_expected.to validate_presence_of(:project_id) }
it { is_expected.to validate_presence_of(:user_id) }
end