Sha256: be9bb03286245a6c31390760abab10526d55c271896a7999be9f1b5623f07f5f
Contents?: true
Size: 1.25 KB
Versions: 5
Compression:
Stored size: 1.25 KB
Contents
require 'rails_helper' module CustomerVault RSpec.describe "customer_vault/people/index", :type => :view do before(:each) do people = [ Corporation.create!( :name => "Corporation_Name", :email => "Corporation_Email", :phone => "Corporation_Phone", :fax => "Corporation_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 expect(rendered).to match "Corporation_Name" expect(rendered).to match "Corporation_Email" expect(rendered).to match "Corporation_Phone" expect(rendered).to match "last_name, first_name" end end end
Version data entries
5 entries across 5 versions & 1 rubygems