Sha256: 84965b050dc5878bfe0bfbc18b558e772075cb31aa63b264afb0c1c1637c8a2c

Contents?: true

Size: 1.26 KB

Versions: 16

Compression:

Stored size: 1.26 KB

Contents

# -*- encoding: utf-8 -*-
require 'rails_helper'

describe UserGroup do
  fixtures :user_groups

  it "should contain string in its display_name" do
    user_group = user_groups(:user_group_00001)
    user_group.display_name = "en:test"
    user_group.valid?.should be_truthy
  end

  it "should not contain invalid yaml in its display_name" do
    user_group = user_groups(:user_group_00001)
    user_group.display_name = "en:test\r\nja: ใƒ†ใ‚นใƒˆ"
    user_group.valid?.should be_falsy
  end
end

# == Schema Information
#
# Table name: user_groups
#
#  id                               :integer          not null, primary key
#  name                             :string
#  display_name                     :text
#  note                             :text
#  position                         :integer
#  created_at                       :datetime
#  updated_at                       :datetime
#  deleted_at                       :datetime
#  valid_period_for_new_user        :integer          default(0), not null
#  expired_at                       :datetime
#  number_of_day_to_notify_overdue  :integer          default(1), not null
#  number_of_day_to_notify_due_date :integer          default(7), not null
#  number_of_time_to_notify_overdue :integer          default(3), not null
#

Version data entries

16 entries across 14 versions & 2 rubygems

Version Path
enju_library-0.3.2 spec/models/user_group_spec.rb
enju_library-0.3.1 spec/models/user_group_spec.rb
enju_library-0.3.0 spec/models/user_group_spec.rb
enju_library-0.3.0.rc.1 spec/models/user_group_spec.rb
enju_library-0.3.0.beta.2 spec/models/user_group_spec.rb
enju_library-0.2.5 spec/models/user_group_spec.rb
enju_library-0.2.4 spec/models/user_group_spec.rb
enju_library-0.2.3 spec/models/user_group_spec.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/enju_library-0.2.2/spec/models/user_group_spec.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/bundler/gems/enju_library-d36f415e177e/spec/models/user_group_spec.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/enju_library-0.2.1/spec/models/user_group_spec.rb
enju_library-0.2.2 spec/models/user_group_spec.rb
enju_library-0.2.1 spec/models/user_group_spec.rb
enju_library-0.2.0 spec/models/user_group_spec.rb
enju_library-0.2.0.beta.10 spec/models/user_group_spec.rb
enju_library-0.2.0.beta.9 spec/models/user_group_spec.rb