Sha256: 11ed51ac20c345f5028a2271f271ae4ba7e5e813d661363851d90eb1327f6aa5

Contents?: true

Size: 856 Bytes

Versions: 7

Compression:

Stored size: 856 Bytes

Contents

require 'spec_helper'

describe 'save options' do
  before :each do
    login
    give_permission("Person")
    @person = create :person
    visit edit_outpost_person_path(@person)
  end

  context "Save" do
    it "returns to the edit page" do
      click_button "edit"
      current_path.should eq edit_outpost_person_path(@person)
      page.should have_css ".alert-success"
    end
  end

  context "Save & Return to List" do
    it "returns to the index page" do
      click_button "index"
      current_path.should eq outpost_people_path
      page.should have_css ".alert-success"
      page.should have_css ".index-header"
    end
  end

  context "Save & Add Another" do
    it "returns to the new page" do
      click_button "new"
      current_path.should eq new_outpost_person_path
      page.should have_css ".alert-success"
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
outpost-cms-0.1.4 spec/features/save_options_spec.rb
outpost-cms-0.1.3 spec/features/save_options_spec.rb
outpost-cms-0.1.2 spec/features/save_options_spec.rb
outpost-cms-0.1.1 spec/features/save_options_spec.rb
outpost-cms-0.1.0 spec/features/save_options_spec.rb
outpost-cms-0.0.5 spec/features/save_options_spec.rb
outpost-cms-0.0.4 spec/features/save_options_spec.rb