mirror of
https://github.com/Fishwaldo/huginn.git
synced 2025-03-15 19:31:26 +00:00
Add specs for icon_for_service.
This commit is contained in:
parent
dc8e8a0eeb
commit
fd97a151f9
1 changed files with 26 additions and 0 deletions
26
spec/helpers/application_helper_spec.rb
Normal file
26
spec/helpers/application_helper_spec.rb
Normal file
|
@ -0,0 +1,26 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe ApplicationHelper do
|
||||
describe '#icon_for_service' do
|
||||
it 'returns a correct icon tag for Twitter' do
|
||||
icon = icon_for_service(:twitter)
|
||||
expect(icon).to be_html_safe
|
||||
elem = Nokogiri(icon).at('i.fa.fa-twitter')
|
||||
expect(elem).to be_a Nokogiri::XML::Element
|
||||
end
|
||||
|
||||
it 'returns a correct icon tag for GitHub' do
|
||||
icon = icon_for_service(:github)
|
||||
expect(icon).to be_html_safe
|
||||
elem = Nokogiri(icon).at('i.fa.fa-github')
|
||||
expect(elem).to be_a Nokogiri::XML::Element
|
||||
end
|
||||
|
||||
it 'returns a correct icon tag for other services' do
|
||||
icon = icon_for_service(:'37signals')
|
||||
expect(icon).to be_html_safe
|
||||
elem = Nokogiri(icon).at('i.fa.fa-lock')
|
||||
expect(elem).to be_a Nokogiri::XML::Element
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Reference in a new issue