summaryrefslogtreecommitdiff
path: root/spec/models/concerns
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-19 00:08:01 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-19 00:08:01 +0000
commit1caa60060b2f9e3417ab335e2f1dea1064163434 (patch)
tree01c0d5825bd345ee625bb70b7433c6e10307fcce /spec/models/concerns
parent7f8330873c1a5860b8a9a52d111083a65d210249 (diff)
downloadgitlab-ce-1caa60060b2f9e3417ab335e2f1dea1064163434.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/concerns')
-rw-r--r--spec/models/concerns/cache_markdown_field_spec.rb2
-rw-r--r--spec/models/concerns/ignorable_columns_spec.rb2
-rw-r--r--spec/models/concerns/loaded_in_group_list_spec.rb1
-rw-r--r--spec/models/concerns/prometheus_adapter_spec.rb1
-rw-r--r--spec/models/concerns/resolvable_note_spec.rb1
-rw-r--r--spec/models/concerns/token_authenticatable_spec.rb1
6 files changed, 8 insertions, 0 deletions
diff --git a/spec/models/concerns/cache_markdown_field_spec.rb b/spec/models/concerns/cache_markdown_field_spec.rb
index 9a12c3d6965..06d12c14793 100644
--- a/spec/models/concerns/cache_markdown_field_spec.rb
+++ b/spec/models/concerns/cache_markdown_field_spec.rb
@@ -92,6 +92,7 @@ describe CacheMarkdownField, :clean_gitlab_redis_cache do
describe '#latest_cached_markdown_version' do
let(:thing) { klass.new }
+
subject { thing.latest_cached_markdown_version }
it 'returns default version' do
@@ -151,6 +152,7 @@ describe CacheMarkdownField, :clean_gitlab_redis_cache do
describe '#banzai_render_context' do
let(:thing) { klass.new(title: markdown, title_html: html, cached_markdown_version: cache_version) }
+
subject(:context) { thing.banzai_render_context(:title) }
it 'sets project to nil if the object lacks a project' do
diff --git a/spec/models/concerns/ignorable_columns_spec.rb b/spec/models/concerns/ignorable_columns_spec.rb
index 55efa1b5fda..018b1296c62 100644
--- a/spec/models/concerns/ignorable_columns_spec.rb
+++ b/spec/models/concerns/ignorable_columns_spec.rb
@@ -49,11 +49,13 @@ describe IgnorableColumns do
context 'with single column' do
let(:columns) { :name }
+
it_behaves_like 'storing removal information'
end
context 'with array column' do
let(:columns) { %i[name created_at] }
+
it_behaves_like 'storing removal information'
end
diff --git a/spec/models/concerns/loaded_in_group_list_spec.rb b/spec/models/concerns/loaded_in_group_list_spec.rb
index 7c97b580779..509811822e0 100644
--- a/spec/models/concerns/loaded_in_group_list_spec.rb
+++ b/spec/models/concerns/loaded_in_group_list_spec.rb
@@ -4,6 +4,7 @@ require 'spec_helper'
describe LoadedInGroupList do
let(:parent) { create(:group) }
+
subject(:found_group) { Group.with_selects_for_list.find_by(id: parent.id) }
describe '.with_selects_for_list' do
diff --git a/spec/models/concerns/prometheus_adapter_spec.rb b/spec/models/concerns/prometheus_adapter_spec.rb
index 3d26ba95192..3ac96b308ed 100644
--- a/spec/models/concerns/prometheus_adapter_spec.rb
+++ b/spec/models/concerns/prometheus_adapter_spec.rb
@@ -103,6 +103,7 @@ describe PrometheusAdapter, :use_clean_rails_memory_store_caching do
describe '#calculate_reactive_cache' do
let(:environment) { create(:environment, slug: 'env-slug') }
+
before do
service.manual_configuration = true
service.active = true
diff --git a/spec/models/concerns/resolvable_note_spec.rb b/spec/models/concerns/resolvable_note_spec.rb
index 4f46252a044..12e50ac807e 100644
--- a/spec/models/concerns/resolvable_note_spec.rb
+++ b/spec/models/concerns/resolvable_note_spec.rb
@@ -5,6 +5,7 @@ require 'spec_helper'
describe Note, ResolvableNote do
let(:project) { create(:project, :repository) }
let(:merge_request) { create(:merge_request, source_project: project) }
+
subject { create(:discussion_note_on_merge_request, noteable: merge_request, project: project) }
context 'resolvability scopes' do
diff --git a/spec/models/concerns/token_authenticatable_spec.rb b/spec/models/concerns/token_authenticatable_spec.rb
index 43b894b5957..36eb8fdaba4 100644
--- a/spec/models/concerns/token_authenticatable_spec.rb
+++ b/spec/models/concerns/token_authenticatable_spec.rb
@@ -13,6 +13,7 @@ end
describe User, 'TokenAuthenticatable' do
let(:token_field) { :feed_token }
+
it_behaves_like 'TokenAuthenticatable'
describe 'ensures authentication token' do