Sha256: c84504f52e00efdb8635cd0b4cea6e1bff0a752f962eea202c7679628e9241f4

Contents?: true

Size: 823 Bytes

Versions: 5

Compression:

Stored size: 823 Bytes

Contents

require 'test_helper'

class HelperDeliveryTest < ActionDispatch::IntegrationTest

  setup do
    Post.create!(subject: 'brabbel', body: 'Dies ist ein Test', user: 'wob', release: Date.today)
    Post.create!(subject: 'fasel', body: 'Dies ist ein zweiter Test', user: 'wob', release: Date.today)
  end

  test "rendering icon" do
    get home_path
    assert_response :success
    Wobapphelpers::Helpers::IconHelper::PREDEFINED_ICONS.each do |key,value|
      assert_match "<i class=\"fas fa-#{value} fa-fw\" aria-hidden=\"true\"></i>", response.body
    end
  end

  test "Post#index" do
    get posts_path
    assert_response :success
  end

  test "render new_link for all models" do
    get home_path
    assert_select "a[href=?]", "/posts/new", count: 2
    assert_select "a[href=?]", "/blogs/new", count: 1
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
wobapphelpers-4.2.0 test/integration/helper_delivery_test.rb
wobapphelpers-4.1.2 test/integration/helper_delivery_test.rb
wobapphelpers-4.1.1 test/integration/helper_delivery_test.rb
wobapphelpers-4.1.0 test/integration/helper_delivery_test.rb
wobapphelpers-4.0.0 test/integration/helper_delivery_test.rb