Sha256: f489b87d6108ca39e7570c27252a781648a471e43934eeb48b4444bfea83869e

Contents?: true

Size: 449 Bytes

Versions: 7

Compression:

Stored size: 449 Bytes

Contents

require 'spec_helper_models'

describe Gaku::BadgeType do

  describe 'relations' do
    it { should have_many :badges }
    it { should have_many(:students).through(:badges) }
  end

  describe 'validations' do
    it { should have_attached_file :badge_image }
    it { should validate_presence_of :name }
  end

  describe '#to_s' do
    let(:badge_type) { build(:badge_type) }
    specify { badge_type.to_s.should eq badge_type.name }
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
gaku-0.2.4 core/spec/models/badge_type_spec.rb
gaku-0.2.3 core/spec/models/badge_type_spec.rb
gaku-0.2.2 core/spec/models/badge_type_spec.rb
gaku-0.2.1 core/spec/models/badge_type_spec.rb
gaku-0.2.0 core/spec/models/badge_type_spec.rb
gaku-0.1.1 core/spec/models/badge_type_spec.rb
gaku-0.1.0 core/spec/models/badge_type_spec.rb