Sha256: df4ffd33c473912b06019ff92946806585c84af90777bcc3c482eb5ed471a2a9

Contents?: true

Size: 1005 Bytes

Versions: 53

Compression:

Stored size: 1005 Bytes

Contents

# frozen_string_literal: true

require 'test_helper'

class ColTest < ActionView::TestCase
  include UiBibz::Helpers::Ui::CoreHelper

  test 'col with options' do
    actual   = ui_col('test', { num: 1, push: 2, offset: 3, pull: 4 }, { class: 'test' })
    expected = '<div class="test col-1 col-push-2 offset-3 col-pull-4">test</div>'

    assert_equal expected, actual
  end

  test 'col with several cols' do
    actual = ui_col(md: { num: 1, push: 2, pull: 4 }, xl: { num: 6, offset: 5 }, class: 'test') do
      'test'
    end
    expected = '<div class="test col-md-1 col-md-push-2 col-md-pull-4 col-xl-6 offset-xl-5">test</div>'

    assert_equal expected, actual
  end

  test 'col' do
    actual = ui_col do
      'test'
    end
    expected = '<div class="col">test</div>'

    assert_equal expected, actual
  end

  test 'col with integer in parameter' do
    actual = ui_col 3 do
      'test'
    end
    expected = '<div class="col-3">test</div>'

    assert_equal expected, actual
  end
end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
ui_bibz-4.0.0.beta16 test/ui/core/layouts/col_test.rb
ui_bibz-4.0.0.beta15 test/ui/core/layouts/col_test.rb
ui_bibz-4.0.0.beta14 test/ui/core/layouts/col_test.rb
ui_bibz-4.0.0.beta13 test/ui/core/layouts/col_test.rb
ui_bibz-4.0.0.beta10 test/ui/core/layouts/col_test.rb
ui_bibz-4.0.0.beta9 test/ui/core/layouts/col_test.rb
ui_bibz-4.0.0.beta8 test/ui/core/layouts/col_test.rb
ui_bibz-4.0.0.beta7 test/ui/core/layouts/col_test.rb
ui_bibz-4.0.0.beta6 test/ui/core/layouts/col_test.rb
ui_bibz-4.0.0.beta4 test/ui/core/layouts/col_test.rb
ui_bibz-4.0.0.beta3 test/ui/core/layouts/col_test.rb
ui_bibz-3.0.13 test/ui/core/layouts/col_test.rb
ui_bibz-3.0.12 test/ui/core/layouts/col_test.rb
ui_bibz-3.0.11 test/ui/core/layouts/col_test.rb
ui_bibz-3.0.10 test/ui/core/layouts/col_test.rb
ui_bibz-3.0.9 test/ui/core/layouts/col_test.rb
ui_bibz-3.0.8 test/ui/core/layouts/col_test.rb
ui_bibz-3.0.7 test/ui/core/layouts/col_test.rb
ui_bibz-3.0.6 test/ui/core/layouts/col_test.rb
ui_bibz-3.0.5 test/ui/core/layouts/col_test.rb