Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
alvinsj committed Jul 3, 2018
1 parent 3aaa594 commit aa497f6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/tabs_for_helper_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ def assert_pane(id, text)
assert_select "div[role=\"tabpanel\"][class=\"tab-pane\"][id=\"#{id}\"]", text: text
end

test "custom class for tabs" do
tabs = tabs_for(object, class: 'tab-header') do |b|
b.tab("Label") { "Content" }
end

concat tabs
assert_select ".tab-header"
end

test "#tab renders tab with translated header with a corresponding pane" do
store_translations(:en, activerecord: {attributes: {project: {name: "Nome"}}}) do
with_concat_tabs_for(object) { |b| b.tab(:name, size: 1) { "Content" } }
Expand Down

0 comments on commit aa497f6

Please sign in to comment.