From: ysksn Date: Wed, 15 Nov 2017 15:04:41 +0000 (+0900) Subject: Add a test for Tag#to_param (#5705) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=7d7df877ef042cda2095f35061d65a9051ad987b;p=mastodon.git Add a test for Tag#to_param (#5705) --- 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")