Skip to content

Commit e1d36ce

Browse files
committed
More encoding fixes
1 parent de2d1e4 commit e1d36ce

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

spec/features/smoke_spec.rb

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -227,20 +227,18 @@
227227
# temprorary go to page 2
228228
page.find('.pagination > .page > a', text: '2').click
229229

230-
nbsp = Nokogiri::HTML(" ").text
231-
232230
(1..4).each do |page_number|
233231
page.find('.pagination > .page > a', text: page_number).click
234232
page.find('.pagination_information').should have_content('Displaying Posts')
235233

236234
offset = (page_number - 1) * per_page
237235
collection_size = [per_page, posts_size - (page_number - 1) * per_page].min
238236

239-
display_total_text = I18n.t 'active_admin.pagination.multiple', :model => 'Posts', :total => posts_size,
240-
:from => offset + 1, :to => offset + collection_size
241-
242-
pagination_information = page.find('.pagination_information').native.to_s.gsub(nbsp,' ')
243-
display_total_text.gsub!(/&(#160|nbsp);/, ' ')
237+
display_total_text = I18n.t 'active_admin.pagination.multiple',
238+
model: 'Posts', total: posts_size,
239+
from: offset + 1, to: offset + collection_size
240+
display_total_text = Nokogiri::HTML(display_total_text).text.gsub(' ', ' ')
241+
pagination_information = page.find('.pagination_information').text
244242
pagination_information.should include(display_total_text)
245243
end
246244
end

0 commit comments

Comments
 (0)