Sha256: 840398526d6295390f9381d2bb5795d8b3b0b6d4e465967accb07e27f448e2a8

Contents?: true

Size: 1.25 KB

Versions: 3

Compression:

Stored size: 1.25 KB

Contents

# -*- encoding: utf-8 -*-
require 'rails_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
#  allow_bookmark_external_url :boolean          default(FALSE), not null
#  url                         :string           default("http://localhost:3000/")
#  settings                    :text
#  html_snippet                :text
#  user_id                     :integer
#

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
enju_library-0.2.0 spec/models/library_group_spec.rb
enju_library-0.2.0.beta.10 spec/models/library_group_spec.rb
enju_library-0.2.0.beta.9 spec/models/library_group_spec.rb