summaryrefslogtreecommitdiff
path: root/spec/models/acts_as_taggable_on/tag_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models/acts_as_taggable_on/tag_spec.rb')
-rw-r--r--spec/models/acts_as_taggable_on/tag_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/models/acts_as_taggable_on/tag_spec.rb b/spec/models/acts_as_taggable_on/tag_spec.rb
new file mode 100644
index 00000000000..4b390bbd0bb
--- /dev/null
+++ b/spec/models/acts_as_taggable_on/tag_spec.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe ActsAsTaggableOn::Tag do
+ it 'has the same connection as Ci::ApplicationRecord' do
+ query = 'select current_database()'
+
+ expect(described_class.connection.execute(query).first).to eq(Ci::ApplicationRecord.connection.execute(query).first)
+ expect(described_class.retrieve_connection.execute(query).first).to eq(Ci::ApplicationRecord.retrieve_connection.execute(query).first)
+ end
+
+ it 'has the same sticking as Ci::ApplicationRecord' do
+ expect(described_class.sticking).to eq(Ci::ApplicationRecord.sticking)
+ end
+end