Sha256: 0681f2004607d2c2206cfa7f76962b7323cf769c193a2d5d60aa746f7fbc17cb
Contents?: true
Size: 1.12 KB
Versions: 16
Compression:
Stored size: 1.12 KB
Contents
# frozen_string_literal: true require 'test_helper' class SpinnerTest < ActionView::TestCase include UiBibz::Helpers::Ui::CoreHelper test 'spinner' do actual = ui_spinner expected = '<div class="spinner-border" role="status"><span class="sr-only">Loading...</span></div>' assert_equal expected, actual end test 'spinner with status and content' do actual = ui_spinner 'My spinner', status: :secondary expected = '<div class="text-secondary spinner-border" role="status"><span class="sr-only">My spinner</span></div>' assert_equal expected, actual end test 'spinner type' do actual = ui_spinner nil, type: :grow expected = '<div class="spinner-grow" role="status"><span class="sr-only">Loading...</span></div>' assert_equal expected, actual end test 'spinner in button' do actual = ui_button 'Load', spinner: { status: :danger, type: :grow } expected = '<button class="btn-secondary btn"><span class="text-danger mr-2 spinner-grow spinner-grow-sm" role="status"><span class="sr-only">Loading...</span></span>Load</button>' assert_equal expected, actual end end
Version data entries
16 entries across 16 versions & 1 rubygems