Sha256: 24829ca1be25475ca6adf1d518a36185e8200e8210c9db8ace223567a0a0848a

Contents?: true

Size: 1.36 KB

Versions: 4

Compression:

Stored size: 1.36 KB

Contents

require 'rails_helper'

module CustomerVault
  RSpec.describe "customer_vault/people/edit", :type => :view do
    before(:each) do
      @person = assign(:person, Person.create!(
        :first_name => "MyString",
        :last_name => "MyString",
        :email => "MyString",
        :title => "MyString",
        :twitter => "MyString",
        :www => "MyString",
        :context => "MyText",
        :phone => "MyString",
        :fax => "MyString",
        :mobile => "MyString"
      ))
    end

    it "renders the edit person form" do
      render

      assert_select "form[action=?][method=?]", customer_vault.person_path(@person), "post" do

        assert_select "input#person_first_name[name=?]", "person[first_name]"

        assert_select "input#person_last_name[name=?]", "person[last_name]"

        assert_select "input#person_email[name=?]", "person[email]"

        assert_select "input#person_title[name=?]", "person[title]"

        assert_select "input#person_twitter[name=?]", "person[twitter]"

        assert_select "input#person_www[name=?]", "person[www]"

        assert_select "textarea#person_context[name=?]", "person[context]"

        assert_select "input#person_phone[name=?]", "person[phone]"

        assert_select "input#person_fax[name=?]", "person[fax]"

        assert_select "input#person_mobile[name=?]", "person[mobile]"
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
customer_vault-0.0.4 spec/views/customer_vault/people/edit.html.slim_spec.rb
customer_vault-0.0.3 spec/views/customer_vault/people/edit.html.slim_spec.rb
customer_vault-0.0.2 spec/views/customer_vault/people/edit.html.slim_spec.rb
customer_vault-0.0.1 spec/views/customer_vault/people/edit.html.slim_spec.rb