Sha256: caa29c8f5a71da3edaae89df6fc0607320b466ceef4019bf9c559415932f71c8
Contents?: true
Size: 1.45 KB
Versions: 3
Compression:
Stored size: 1.45 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 "div#count", :text => "2 people".to_s assert_select "div#name", :text => "Title First Name Last Name".to_s, :count => 2 assert_select "div#email", :text => "Email: Email".to_s, :count => 2 assert_select "div#phone", :text => "Phone: Phone".to_s, :count => 2 assert_select "div#mobile", :text => "Mobile: Mobile".to_s, :count => 2 assert_select "div#www", :text => "http://Www".to_s, :count => 2 end end end
Version data entries
3 entries across 3 versions & 1 rubygems