Sha256: c98a0074ca04f3ed90e277ff2e6ba1dc5fac6b81f27610fb6b15bab231384ecd

Contents?: true

Size: 989 Bytes

Versions: 26

Compression:

Stored size: 989 Bytes

Contents

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

describe LibraryGroup do
  fixtures :library_groups

  it "should get library_group_config" do
    LibraryGroup.site_config.should be_true
  end

  it "should allow access from allowed networks" do
    library_group = LibraryGroup.find(1)
    library_group.my_networks = "127.0.0.1"
    library_group.network_access_allowed?("192.168.0.1").should be_false
  end
end

# == Schema Information
#
# Table name: library_groups
#
#  id             :integer          not null, primary key
#  name           :string(255)      not null
#  display_name   :text
#  short_name     :string(255)      not null
#  email          :string(255)
#  my_networks    :text
#  login_banner   :text
#  note           :text
#  country_id     :integer
#  position       :integer
#  created_at     :datetime         not null
#  updated_at     :datetime         not null
#  admin_networks :text
#  url            :string(255)      default("http://localhost:3000/")
#

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
enju_library-0.1.0.pre32 spec/models/library_group_spec.rb
enju_library-0.1.0.pre31 spec/models/library_group_spec.rb
enju_library-0.1.0.pre30 spec/models/library_group_spec.rb
enju_library-0.1.0.pre29 spec/models/library_group_spec.rb
enju_library-0.1.0.pre28 spec/models/library_group_spec.rb
enju_library-0.1.0.pre27 spec/models/library_group_spec.rb
enju_library-0.1.0.pre26 spec/models/library_group_spec.rb
enju_library-0.1.0.pre25 spec/models/library_group_spec.rb
enju_library-0.1.0.pre24 spec/models/library_group_spec.rb
enju_library-0.1.0.pre23 spec/models/library_group_spec.rb
enju_library-0.1.0.pre22 spec/models/library_group_spec.rb
enju_library-0.1.0.pre21 spec/models/library_group_spec.rb
enju_library-0.1.0.pre20 spec/models/library_group_spec.rb
enju_library-0.1.0.pre19 spec/models/library_group_spec.rb
enju_library-0.1.0.pre18 spec/models/library_group_spec.rb
enju_library-0.1.0.pre17 spec/models/library_group_spec.rb
enju_library-0.1.0.pre16 spec/models/library_group_spec.rb
enju_library-0.1.0.pre15 spec/models/library_group_spec.rb
enju_library-0.1.0.pre14 spec/models/library_group_spec.rb
enju_library-0.1.0.pre13 spec/models/library_group_spec.rb