Sha256: 365754a33693e6949c0bc95cb429a8ccfaaf5f15132aad128cbc8a521b4e61a1
Contents?: true
Size: 1.35 KB
Versions: 1
Compression:
Stored size: 1.35 KB
Contents
require 'rails_helper' module CustomerVault RSpec.describe "customer_vault/people/index", :type => :view do before(:each) do people = [ Corporation.create!( :name => "Name", :email => "Email", :phone => "Phone", :fax => "Fax" ), Individual.new( :first_name => "first_name", :last_name => "last_name", :email => "MyString", :title => "MyString", :twitter => "MyString", :www => "MyString", :context => "MyText", :phone => "MyString", :fax => "MyString", :mobile => "MyString" ) ] assign(:people, Kaminari.paginate_array(people).page(1)) controller.singleton_class.class_eval do protected def sortable_column(column, direction) "#" end helper_method :sortable_column end end it "renders a list of corporations" do render assert_select "#name", :text => "Name".to_s, :count => 1 assert_select "#email", :text => "Email: Email".to_s, :count => 1 assert_select "#phone", :text => "Phone: Phone".to_s, :count => 1 assert_select ".first_name", :text => "first_name", :count => 1 assert_select ".last_name", :text => "last_name", :count => 1 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
customer_vault-1.0.1 | spec/views/customer_vault/people/index.html.slim_spec.rb |