logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

filter_helper_spec.rb (562B)


  1. require 'rails_helper'
  2. describe Admin::FilterHelper do
  3. it 'Uses filter_link_to to create filter links' do
  4. params = ActionController::Parameters.new(
  5. { test: 'test' }
  6. )
  7. allow(helper).to receive(:params).and_return(params)
  8. allow(helper).to receive(:url_for).and_return('/test')
  9. result = helper.filter_link_to('text', { resolved: true })
  10. expect(result).to match(/text/)
  11. end
  12. it 'Uses table_link_to to create icon links' do
  13. result = helper.table_link_to 'icon', 'text', 'path'
  14. expect(result).to match(/text/)
  15. end
  16. end