Module: Spree::TestingSupport::Flash
- Defined in:
- lib/spree/testing_support/flash.rb
Instance Method Summary collapse
Instance Method Details
#assert_flash_success(flash) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/spree/testing_support/flash.rb', line 6 def assert_flash_success(flash) flash = convert_flash(flash) within("[class='flash success']") do expect(page).to have_content(flash) end end |
#assert_successful_update_message(resource) ⇒ Object
14 15 16 17 |
# File 'lib/spree/testing_support/flash.rb', line 14 def (resource) flash = I18n.t('spree.successfully_updated', resource: I18n.t(resource, scope: 'spree')) assert_flash_success(flash) end |