Sha256: af754574a9fb8caf86ebd23771c39fc44a5b13969f3ee48d82f389d4bdb1fc06

Contents?: true

Size: 724 Bytes

Versions: 11

Compression:

Stored size: 724 Bytes

Contents

require 'spec_helper'

feature 'Dashboard resource finder exception' do
  before do

    @admin = create(:admin, password: '123123123',
                    password_confirmation: '123123123')
    login_as(@admin, scope: :user)
    @faalis = Faalis::Engine.routes.url_helpers
  end

  scenario 'User try to find a resource which does not exists via js format.' do
    visit @faalis.dashboard_auth_user_path({ id: 3242, format: :js})
    expect(page).to have_text('error_message(')
  end

  scenario 'User try to find a valid resource' do
    visit @faalis.dashboard_auth_user_path({ id: 1 })
    expect(page).not_to have_text('404')
    expect(page).to have_text('User')
    expect(page).not_to have_text('Oops!')
  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
faalis-2.0.8 spec/features/record_not_found_spec.rb
faalis-2.0.7 spec/features/record_not_found_spec.rb
faalis-2.0.5 spec/features/record_not_found_spec.rb
faalis-2.0.4 spec/features/record_not_found_spec.rb
faalis-2.0.3 spec/features/record_not_found_spec.rb
faalis-2.0.1 spec/features/record_not_found_spec.rb
faalis-2.0.0 spec/features/record_not_found_spec.rb
faalis-2.0.0.rc6 spec/features/record_not_found_spec.rb
faalis-2.0.0.rc5 spec/features/record_not_found_spec.rb
faalis-2.0.0.rc4 spec/features/record_not_found_spec.rb
faalis-2.0.0.rc3 spec/features/record_not_found_spec.rb