# frozen_string_literal: true
require 'test_helper'
class SpinnerTest < ActionView::TestCase
include UiBibz::Helpers::Ui::CoreHelper
test 'spinner' do
actual = ui_spinner
expected = '
Loading...
'
assert_equal expected, actual
end
test 'spinner with status and content' do
actual = ui_spinner 'My spinner', status: :secondary
expected = '
My spinner
'
assert_equal expected, actual
end
test 'spinner type' do
actual = ui_spinner nil, type: :grow
expected = '
Loading...
'
assert_equal expected, actual
end
test 'spinner in button' do
actual = ui_button 'Load', spinner: { status: :danger, type: :grow }
expected = ''
assert_equal expected, actual
end
end