Sha256: a86c0ce4e4465effbaf82e6509f31ee4b3e955a92fa8e4119ee2618c6f7e3429

Contents?: true

Size: 688 Bytes

Versions: 2

Compression:

Stored size: 688 Bytes

Contents

require 'spec_helper'

module Gringotts
  describe Attempt do

    before(:each) do
      @attempt = FactoryGirl.build(:base_gringotts_attempt)
    end
    
    it "should require a user_id" do
      @attempt = FactoryGirl.build(:bad_without_vault_attempt)
      @attempt.valid?.should be_false
    end
    
    it "should require a code_received" do
      @attempt = FactoryGirl.build(:bad_without_code_attempt)
      @attempt.valid?.should be_false
    end
    
    it "should require a code_received of at least some length" do
      @attempt = FactoryGirl.build(:bad_without_code_attempt)
      @attempt.code_received = ""
      @attempt.valid?.should be_false
    end
    
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gringotts-0.6.7 spec/models/gringotts/attempt_spec.rb
gringotts-0.6.5 spec/models/gringotts/attempt_spec.rb