Sha256: 81e09a286e86bb5d7bcec0b4ec378c503a73d65b380e00d193da276ed408f755

Contents?: true

Size: 1.33 KB

Versions: 4

Compression:

Stored size: 1.33 KB

Contents

require 'rails_helper'

module CustomerVault
  RSpec.describe "customer_vault/people/new", :type => :view do
    before(:each) do
      assign(:person, Person.new(
        :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 new person form" do
      render

      assert_select "form[action=?][method=?]", customer_vault.people_path, "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/new.html.slim_spec.rb
customer_vault-0.0.3 spec/views/customer_vault/people/new.html.slim_spec.rb
customer_vault-0.0.2 spec/views/customer_vault/people/new.html.slim_spec.rb
customer_vault-0.0.1 spec/views/customer_vault/people/new.html.slim_spec.rb