Skip to content

Commit

Permalink
Implement test for FontAwesome.item_hash
Browse files Browse the repository at this point in the history
  • Loading branch information
ruedap committed Aug 26, 2013
1 parent b42c0ed commit 437a287
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions workflow/test/font_awesome_test.rb
Expand Up @@ -83,4 +83,20 @@
it { @icons.count.must_equal 378 }
end
end

describe '.item_hash' do
before do
@icon = 'apple'
@item_hash = FontAwesome.item_hash(@icon)
end

it { @item_hash[:uid].must_equal '' }
it { @item_hash[:title].must_equal @icon }
it { @item_hash[:subtitle].must_equal "Copy to clipboard: icon-#{@icon}" }
it { @item_hash[:arg].must_equal @icon }
it { @item_hash[:icon][:type].must_equal 'default' }
it { @item_hash[:icon][:name].must_equal "icon-#{@icon}.png" }
it { @item_hash[:valid].must_equal 'yes' }
it { @item_hash.count.must_equal 6 }
end
end

0 comments on commit 437a287

Please sign in to comment.