Skip to content

Commit

Permalink
Keyword arguments tests are corrected according to cells functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
AlfonsoUceda committed Nov 13, 2024
1 parent eb247cf commit c0dacb7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions test/dummy/app/cells/song_cell.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ def with_escaped
render
end

def with_title(with_title: '')
"<h1>#{with_title}</h1>"
def with_title(options)
"<h1>#{options[:with_title]}</h1>"
end
# include ActionView::Helpers::AssetUrlHelper
# include Sprockets::Rails::Helper
Expand Down
5 changes: 2 additions & 3 deletions test/dummy/test/rails_extensions_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ def show
"<b>#{model}</b>"
end

def with_title(with_title: '')
"<h1>#{with_title}</h1><b>#{model}</b>"
def with_title(options)
"<h1>#{options[:with_title]}</h1><b>#{model}</b>"
end
end

Expand Down Expand Up @@ -51,7 +51,6 @@ def with_title(with_title: '')
end

test "cell(..) with #call keyword args" do
skip("cells 4.1.7 does not support this")
get :view_with_cell_with_call_keyword_args
assert_equal "<h1>test</h1><b>A Tale That Wasn't Right</b>", @response.body
end
Expand Down

0 comments on commit c0dacb7

Please sign in to comment.