Skip to content

Commit

Permalink
Remove sprited_text helper method
Browse files Browse the repository at this point in the history
This is a remnant of the Bento UI.
  • Loading branch information
Dany Marcoux committed May 19, 2020
1 parent daa9701 commit dab2b31
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
4 changes: 0 additions & 4 deletions src/api/app/helpers/webui/webui_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,6 @@ def sprite_tag(icon, opts = {})
image_tag('s.gif', opts)
end

def sprited_text(icon, text)
sprite_tag(icon, title: text) + ' ' + text
end

def next_codemirror_uid
return @codemirror_editor_setup = 0 unless @codemirror_editor_setup
@codemirror_editor_setup += 1
Expand Down
9 changes: 0 additions & 9 deletions src/api/spec/helpers/webui/webui_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,6 @@
end
end

describe '#sprited_text' do
it 'returns a img element with a matching icon class and title attribute and text' do
expect(sprited_text('brick_edit', 'Edit description')).to eq('<img title="Edit description" ' \
'class="icons-brick_edit" alt="Edit description" src="/images/s.gif" /> Edit description')
expect(sprited_text('user_add', 'Request role addition')).to eq('<img title="Request role addition" ' \
'class="icons-user_add" alt="Request role addition" src="/images/s.gif" /> Request role addition')
end
end

describe '#next_codemirror_uid' do
before do
@codemirror_editor_setup = 0
Expand Down

0 comments on commit dab2b31

Please sign in to comment.