Sha256: 3e2c8f2201a644c90ea7854cea817f76088d1e6707f8bc104d2ac46aabd236db

Contents?: true

Size: 403 Bytes

Versions: 2

Compression:

Stored size: 403 Bytes

Contents

require "spec_helper"

describe ActionView::Base, type: :helper do
  it "responds ot current_tenant" do
    expect(helper).to respond_to(:current_tenant)
  end

  it "returns nil if no tenant set" do
    expect(helper.current_tenant).to be_nil
  end

  it "returns the current tenant" do
    ActsAsTenant.current_tenant = accounts(:foo)
    expect(helper.current_tenant).to eq(accounts(:foo))
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
acts_as_tenant-0.5.1 spec/helpers/tenant_helper_spec.rb
acts_as_tenant-0.5.0 spec/helpers/tenant_helper_spec.rb