diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
commit | 8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch) | |
tree | a77e7fe7a93de11213032ed4ab1f33a3db51b738 /spec/models/user_interacted_project_spec.rb | |
parent | 00b35af3db1abfe813a778f643dad221aad51fca (diff) |
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'spec/models/user_interacted_project_spec.rb')
-rw-r--r-- | spec/models/user_interacted_project_spec.rb | 17 |
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 |