Sha256: 328e71af2c3c97742cca075f3037276b5b2a3b452b29768bc0e16a24cbbca434

Contents?: true

Size: 1 KB

Versions: 4

Compression:

Stored size: 1 KB

Contents

feature 'jump_back features' do
  describe 'redirect_back' do
    it 'should redirect back' do
      visit new_test_path
      click_button 'New test'
      expect(page).to have_content('New Page')
    end
  end
  
  describe 'return_to_referer' do
    it 'should return to saved referer' do
      visit edit_test_path(1)
      click_link 'Go to new page'
      visit tests_path
      click_button 'Update test'
      expect(page).to have_content('Edit Page')
    end
    
    it 'should not reset referer if not cleared' do
      visit edit_test_path(1)
      click_link 'Go to new page'
      visit tests_path
      click_link 'Go to new page'
      visit tests_path
      click_button 'Update test'
      expect(page).to have_content('Edit Page')
    end
    
    it 'should reset referer if cleared' do
      visit edit_test_path(1)
      click_link 'Go to new page'
      click_link 'Go to edit page'
      visit tests_path
      click_button 'Update test'
      expect(page).to have_content('New Page')
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
jump_back-0.2.2 spec/features/jump_back_feature_spec.rb
jump_back-0.2.1 spec/features/jump_back_feature_spec.rb
jump_back-0.1.1 spec/features/jump_back_feature_spec.rb
jump_back-0.0.1 spec/features/jump_back_feature_spec.rb