Sha256: 9bcd8068995225387de9fbf123211e8f79453b68cf26cd45677acc934427e430
Contents?: true
Size: 587 Bytes
Versions: 1
Compression:
Stored size: 587 Bytes
Contents
require 'test_setup' class CompanyTest < MiniTest::Unit::TestCase include InterTest Company = IntercomRails::Proxy::Company DUMMY_COMPANY = dummy_company def test_finds_current_company IntercomRails.config.company.current = Proc.new { @app } object_with_app_instance_var = Object.new object_with_app_instance_var.instance_variable_set(:@app, DUMMY_COMPANY) c = Company.current_in_context(object_with_app_instance_var) assert_equal true, c.valid? expected_hash = {:id => '6', :name => 'Intercom'} assert_equal expected_hash, c.to_hash end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
intercom-rails-0.2.0 | test/intercom-rails/proxy/company_test.rb |