summaryrefslogtreecommitdiff
path: root/spec/models/concerns
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2017-04-10 19:50:48 +0100
committerNick Thomas <nick@gitlab.com>2017-04-21 11:52:28 +0100
commite9819de10aa1ca29cb760c714c37ab0a23c0bd89 (patch)
tree5fa50e7464ae0239b885cd9d0d9271b393263d6d /spec/models/concerns
parent6647542cd4db5f5aba36ae7d7d029bdaf8b59a35 (diff)
downloadgitlab-ce-e9819de10aa1ca29cb760c714c37ab0a23c0bd89.tar.gz
Remove the ClearDatabaseCacheWorker
Diffstat (limited to 'spec/models/concerns')
-rw-r--r--spec/models/concerns/cache_markdown_field_spec.rb17
1 files changed, 3 insertions, 14 deletions
diff --git a/spec/models/concerns/cache_markdown_field_spec.rb b/spec/models/concerns/cache_markdown_field_spec.rb
index 6151d53cd91..568b34aa42a 100644
--- a/spec/models/concerns/cache_markdown_field_spec.rb
+++ b/spec/models/concerns/cache_markdown_field_spec.rb
@@ -1,9 +1,6 @@
require 'spec_helper'
describe CacheMarkdownField do
- caching_classes = CacheMarkdownField::CACHING_CLASSES
- CacheMarkdownField::CACHING_CLASSES = ["ThingWithMarkdownFields"].freeze
-
# The minimum necessary ActiveModel to test this concern
class ThingWithMarkdownFields
include ActiveModel::Model
@@ -55,8 +52,6 @@ describe CacheMarkdownField do
end
end
- CacheMarkdownField::CACHING_CLASSES = caching_classes
-
def thing_subclass(new_attr)
Class.new(ThingWithMarkdownFields) { add_attr(new_attr) }
end
@@ -69,15 +64,9 @@ describe CacheMarkdownField do
subject { ThingWithMarkdownFields.new(foo: markdown, foo_html: html) }
- describe ".attributes" do
- it "excludes cache attributes" do
- expect(thing_subclass(:qux).new.attributes.keys.sort).to eq(%w[bar baz foo qux])
- end
- end
-
- describe ".cache_markdown_field" do
- it "refuses to allow untracked classes" do
- expect { thing_subclass(:qux).__send__(:cache_markdown_field, :qux) }.to raise_error(RuntimeError)
+ describe '.attributes' do
+ it 'excludes cache attributes' do
+ expect(subject.attributes.keys.sort).to eq(%w[bar baz foo])
end
end