Sha256: b135a9a35b238fc2a3ab4244aa70988d58cc4f2590df28bb1aeca072e2960fc0

Contents?: true

Size: 1.62 KB

Versions: 1

Compression:

Stored size: 1.62 KB

Contents

require 'rails_helper'
module CustomerVault
    RSpec.describe "customer_vault/people/index", :type => :view do
      before(:each) do
        assign(:people, [
          Person.create!(
            :first_name => "First Name",
            :last_name => "Last Name",
            :email => "Email",
            :title => "Title",
            :twitter => "Twitter",
            :www => "Www",
            :context => "MyText",
            :phone => "Phone",
            :fax => "Fax",
            :mobile => "Mobile"
          ),
          Person.create!(
            :first_name => "First Name",
            :last_name => "Last Name",
            :email => "Email",
            :title => "Title",
            :twitter => "Twitter",
            :www => "Www",
            :context => "MyText",
            :phone => "Phone",
            :fax => "Fax",
            :mobile => "Mobile"
          )
        ])
      end

      it "renders a list of people" do
        render
        assert_select "tr>td", :text => "First Name".to_s, :count => 2
        assert_select "tr>td", :text => "Last Name".to_s, :count => 2
        assert_select "tr>td", :text => "Email".to_s, :count => 2
        assert_select "tr>td", :text => "Title".to_s, :count => 2
        assert_select "tr>td", :text => "Twitter".to_s, :count => 2
        assert_select "tr>td", :text => "Www".to_s, :count => 2
        assert_select "tr>td", :text => "MyText".to_s, :count => 2
        assert_select "tr>td", :text => "Phone".to_s, :count => 2
        assert_select "tr>td", :text => "Fax".to_s, :count => 2
        assert_select "tr>td", :text => "Mobile".to_s, :count => 2
      end
    end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
customer_vault-0.0.1 spec/views/customer_vault/people/index.html.slim_spec.rb