Commit ffe4e5c7 authored by Clement Ho's avatar Clement Ho

Improve specs

parent 7f66e8ad
......@@ -4,12 +4,14 @@ describe IconsHelper do
describe 'icon' do
it 'returns aria-hidden by default' do
star = icon('star')
expect(star['aria-hidden']).to eq 'aria-hidden'
end
it 'does not return aria-hidden if aria-label is set' do
up = icon('up', 'aria-label' => 'up')
expect(up['aria-hidden']).to eq nil
expect(up['aria-hidden']).to be_nil
expect(up['aria-label']).to eq 'aria-label'
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment