Sha256: c846fe41e1b202f708affaad754f7f0c24f6ce424faf29cdc8e46c42cd95e2a4

Contents?: true

Size: 959 Bytes

Versions: 10

Compression:

Stored size: 959 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_truthy
  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_falsy
  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
#  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

10 entries across 10 versions & 1 rubygems

Version Path
enju_library-0.1.0.pre43 spec/models/library_group_spec.rb
enju_library-0.1.0.pre42 spec/models/library_group_spec.rb
enju_library-0.1.0.pre41 spec/models/library_group_spec.rb
enju_library-0.1.0.pre40 spec/models/library_group_spec.rb
enju_library-0.1.0.pre39 spec/models/library_group_spec.rb
enju_library-0.1.0.pre38 spec/models/library_group_spec.rb
enju_library-0.1.0.pre37 spec/models/library_group_spec.rb
enju_library-0.1.0.pre36 spec/models/library_group_spec.rb
enju_library-0.1.0.pre35 spec/models/library_group_spec.rb
enju_library-0.1.0.pre34 spec/models/library_group_spec.rb