Sha256: e2520deb1de090fa6ebac6aed33e29f82eb58fe17e02b53ba2b7b8be0200c7ed

Contents?: true

Size: 949 Bytes

Versions: 9

Compression:

Stored size: 949 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           not null
#  display_name   :text
#  short_name     :string           not null
#  my_networks    :text
#  login_banner   :text
#  note           :text
#  country_id     :integer
#  position       :integer
#  created_at     :datetime
#  updated_at     :datetime
#  admin_networks :text
#  url            :string           default("http://localhost:3000/")
#  settings       :text
#

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
enju_library-0.2.0.beta.4 spec/models/library_group_spec.rb
enju_library-0.2.0.beta.3 spec/models/library_group_spec.rb
enju_library-0.2.0.beta.2 spec/models/library_group_spec.rb
enju_library-0.2.0.beta.1 spec/models/library_group_spec.rb
enju_library-0.1.2 spec/models/library_group_spec.rb
enju_library-0.1.1 spec/models/library_group_spec.rb
enju_library-0.1.0 spec/models/library_group_spec.rb
enju_library-0.1.0.pre45 spec/models/library_group_spec.rb
enju_library-0.1.0.pre44 spec/models/library_group_spec.rb