Sha256: aa6a026803d0f677f25026844e40b278f838db7a0fad334e733820350f5867de

Contents?: true

Size: 1.47 KB

Versions: 6

Compression:

Stored size: 1.47 KB

Contents

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

describe SearchHistory do
  fixtures :all

  it "should destroy all history" do
    user = users(:admin)
    old_count = SearchHistory.count
    old_user_count = user.search_histories.count
    SearchHistory.remove_all_history(user)
    user.search_histories.count.should eq 0
    SearchHistory.count.should eq old_count
  end
end

# == Schema Information
#
# Table name: search_histories
#
#  id                             :integer         not null, primary key
#  user_id                        :integer
#  operation                      :string(255)     default("searchRetrieve")
#  sru_version                    :float           default(1.2)
#  query                          :string(255)
#  start_record                   :integer
#  maximum_records                :integer
#  record_packing                 :string(255)
#  record_schema                  :string(255)
#  result_set_ttl                 :integer
#  stylesheet                     :string(255)
#  extra_request_data             :string(255)
#  number_of_records              :integer         default(0)
#  result_set_id                  :string(255)
#  result_set_idle_time           :integer
#  records                        :text
#  next_record_position           :integer
#  diagnostics                    :text
#  extra_response_data            :text
#  echoed_search_retrieve_request :text
#  created_at                     :datetime
#  updated_at                     :datetime
#

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
enju_search_log-0.1.0.pre5 spec/models/search_history_spec.rb
enju_search_log-0.1.0.pre4 spec/models/search_history_spec.rb
enju_search_log-0.1.0.pre3 spec/models/search_history_spec.rb
enju_search_log-0.1.0.pre2 spec/models/search_history_spec.rb
enju_search_log-0.1.0.pre spec/models/search_history_spec.rb
enju_search_log-0.0.7 spec/models/search_history_spec.rb