about summary refs log tree commit diff
path: root/spec/models
diff options
context:
space:
mode:
authorysksn <bluewhale1982@gmail.com>2017-11-16 00:04:41 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-11-15 16:04:41 +0100
commit7d7df877ef042cda2095f35061d65a9051ad987b (patch)
treeb4a81694e330a63d88d43ba9b0b2350769729ba2 /spec/models
parentc73a1fb5377556884ffab97fe95e98b92a027ebe (diff)
Add a test for Tag#to_param (#5705)
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/tag_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/models/tag_spec.rb b/spec/models/tag_spec.rb
index f727fa1dd..1ca50cc29 100644
--- a/spec/models/tag_spec.rb
+++ b/spec/models/tag_spec.rb
@@ -35,6 +35,13 @@ RSpec.describe Tag, type: :model do
     end
   end
 
+  describe '#to_param' do
+    it 'returns name' do
+      tag = Fabricate(:tag, name: 'foo')
+      expect(tag.to_param).to eq 'foo'
+    end
+  end
+
   describe '.search_for' do
     it 'finds tag records with matching names' do
       tag = Fabricate(:tag, name: "match")