Skip to content

Commit

Permalink
Add test coverage for ApplicationHelper
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] authored Sep 1, 2023
1 parent 3a9fb68 commit 4c429c1
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions spec/helpers/application_helper_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
require 'rails_helper'

RSpec.describe ApplicationHelper, type: :helper do
describe '#icon' do
it 'returns the correct HTML tag with the correct attributes' do
# Arrange
id = 'test'
label = 'Test Label'

# Act
result = helper.icon(id, label)

# Assert
expect(result).to eq("<i class=\"bi bi-#{id}\" role=\"img\" aria-label=\"#{label}\" title=\"#{label}\"></i>")
end
end

# Add similar describe and it blocks for the other methods in the ApplicationHelper module
end

0 comments on commit 4c429c1

Please sign in to comment.