Module: Spree::TestingSupport::Flash

Defined in:
lib/spree/testing_support/flash.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) assert_flash_success(flash)



4
5
6
7
8
9
10
# File 'lib/spree/testing_support/flash.rb', line 4

def assert_flash_success(flash)
  flash = convert_flash(flash)

  within("[class='flash success']") do
    expect(page).to have_content(flash)
  end
end

- (Object) assert_successful_update_message(resource)



12
13
14
15
# File 'lib/spree/testing_support/flash.rb', line 12

def assert_successful_update_message(resource)
  flash = Spree.t(:successfully_updated, resource: Spree.t(resource))
  assert_flash_success(flash)
end