Sha256: ad1bd74d2bf01b24b830dab3531833f4ab0a88d85ed5d4efd00e5a670b3378e9
Contents?: true
Size: 1.29 KB
Versions: 5
Compression:
Stored size: 1.29 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 people" 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 ".name", :text => "last_name, first_name", :count => 1 end end end
Version data entries
5 entries across 5 versions & 1 rubygems