Sha256: 7ef041c038e31438cf8de62bf5e4abaf00812edc077b897b9f7d2dba015dd800

Contents?: true

Size: 444 Bytes

Versions: 13

Compression:

Stored size: 444 Bytes

Contents

require 'rails_multitenant/rspec'

describe "be_multitenant_on matcher" do
  it "accepts a valid context field id" do
    expect(ExternalItem).to be_multitenant_on(:external_organization_id)
  end

  it "rejects an invalid context field id" do
    expect(ExternalItem).not_to be_multitenant_on(:other_field)
  end

  it "rejects classes that don't have a context field id" do
    expect(String).not_to be_multitenant_on(:other_field)
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
rails_multitenant-0.12.0 spec/be_multitenant_on_matcher_spec.rb
rails_multitenant-0.11.0 spec/be_multitenant_on_matcher_spec.rb
rails_multitenant-0.10.0 spec/be_multitenant_on_matcher_spec.rb
rails_multitenant-0.9.0 spec/be_multitenant_on_matcher_spec.rb
rails_multitenant-0.8.0 spec/be_multitenant_on_matcher_spec.rb
rails_multitenant-0.7.2 spec/be_multitenant_on_matcher_spec.rb
rails_multitenant-0.7.1 spec/be_multitenant_on_matcher_spec.rb
rails_multitenant-0.7.0 spec/be_multitenant_on_matcher_spec.rb
rails_multitenant-0.6.0 spec/be_multitenant_on_matcher_spec.rb
rails_multitenant-0.5.2 spec/be_multitenant_on_matcher_spec.rb
rails_multitenant-0.5.1 spec/be_multitenant_on_matcher_spec.rb
rails_multitenant-0.5.0 spec/be_multitenant_on_matcher_spec.rb
rails_multitenant-0.4.0 spec/be_multitenant_on_matcher_spec.rb