Sha256: 1496abd2e4ebcc3ccb695ef15d486da50bfd858f731b7a294762652707145093

Contents?: true

Size: 733 Bytes

Versions: 28

Compression:

Stored size: 733 Bytes

Contents

require 'test_helper'

class TeamTest < ActiveSupport::TestCase

  context "a team" do
    
    setup do
      setup_world()
      @team = Factory( :team )  # stock object for validation testing
    end

    should have_db_column(:tenant_id)
    should_not allow_mass_assignment_of(:tenant_id)
    should "define the current tenant" do
      assert  Thread.current[:tenant_id]
    end
    should "match the current tenant" do
      assert_equal  @team.tenant_id, Thread.current[:tenant_id]
    end

    should have_many( :team_assets )
    should have_many( :team_members ).through( :team_assets )
    
    should 'ensure team asset creation' do
      assert  @team.team_assets.size > 1
    end
  
  end   # context team

end # team

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
milia-0.3.38 test/rails_app/test/unit/team_test.rb
milia-0.3.34 test/rails_app/test/unit/team_test.rb
milia-0.3.33 test/rails_app/test/unit/team_test.rb
milia-0.3.32 test/rails_app/test/unit/team_test.rb
milia-0.3.31 test/rails_app/test/unit/team_test.rb
milia-0.3.30 test/rails_app/test/unit/team_test.rb
milia-0.3.29 test/rails_app/test/unit/team_test.rb
milia-0.3.28 test/rails_app/test/unit/team_test.rb
milia-0.3.27 test/rails_app/test/unit/team_test.rb
milia-0.3.26 test/rails_app/test/unit/team_test.rb
milia-0.3.25 test/rails_app/test/unit/team_test.rb
milia-0.3.24 test/rails_app/test/unit/team_test.rb
milia-0.3.23 test/rails_app/test/unit/team_test.rb
milia-0.3.22 test/rails_app/test/unit/team_test.rb
milia-0.3.21 test/rails_app/test/unit/team_test.rb
milia-0.3.20 test/rails_app/test/unit/team_test.rb
milia-0.3.19 test/rails_app/test/unit/team_test.rb
milia-0.3.18 test/rails_app/test/unit/team_test.rb
milia-0.3.17 test/rails_app/test/unit/team_test.rb
milia-0.3.16 test/rails_app/test/unit/team_test.rb