Sha256: c455c2f45455fe23a37c926c6979a078f2d8ef0119c61e6c7d237074b2c889f7

Contents?: true

Size: 624 Bytes

Versions: 7

Compression:

Stored size: 624 Bytes

Contents

# -*- encoding : utf-8 -*-
require 'wagn/spec_helper'

describe Card::Set::Right::Email do
  
  before do
    @card = Card.fetch 'u1+*email'
    @format = Card::Format.new @card, :format=>nil
  end

  it 'should render email address' do
    Account.as_bot do
      @format.render_raw.should == 'u1@user.com'
    end
  end

  it 'should be hidden to Joe User by default' do
    @card.ok?(:read).should be_false
    @format.render_raw.should =~ /denied/
  end

  it "should render blank if email doesn't exist" do
    Account.as_bot do
      Card::Format.new( Card.fetch "A+*email" ).render_raw.should == ''
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
wagn-1.12.13 spec/mods/standard/sets/right/email_spec.rb
wagn-1.12.12 spec/mods/standard/sets/right/email_spec.rb
wagn-1.12.11 spec/mods/standard/sets/right/email_spec.rb
wagn-1.12.10 spec/mods/standard/sets/right/email_spec.rb
wagn-1.12.9 spec/mods/standard/sets/right/email_spec.rb
wagn-1.12.8 spec/mods/standard/sets/right/email_spec.rb
wagn-1.12.7 spec/mods/standard/sets/right/email_spec.rb