aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/general_controller_spec.rb7
-rw-r--r--spec/fixtures/info_request_events.yml4
-rw-r--r--spec/fixtures/info_requests.yml2
-rw-r--r--spec/fixtures/raw_emails.yml6
4 files changed, 12 insertions, 7 deletions
diff --git a/spec/controllers/general_controller_spec.rb b/spec/controllers/general_controller_spec.rb
index 00239c14e..6c9f8b88d 100644
--- a/spec/controllers/general_controller_spec.rb
+++ b/spec/controllers/general_controller_spec.rb
@@ -116,8 +116,13 @@ describe GeneralController, "when searching" do
end
it 'should list the newest successful request first' do
- # Make sure the newest is listed first even if an older one has an even newer comment:
+ # Make sure the newest is listed first even if an older one
+ # has a newer comment or was reclassified more recently:
# https://github.com/sebbacon/alaveteli/issues/370
+ #
+ # This is a deliberate behaviour change, in that the
+ # previous behaviour (showing more-recently-reclassified
+ # requests first) was intentional.
get :frontpage
assigns[:request_events].first.info_request.should == info_requests(:another_boring_request)
end
diff --git a/spec/fixtures/info_request_events.yml b/spec/fixtures/info_request_events.yml
index 3fdeb16e9..c72ef60c8 100644
--- a/spec/fixtures/info_request_events.yml
+++ b/spec/fixtures/info_request_events.yml
@@ -60,14 +60,14 @@ boring_outgoing_message_event:
created_at: 2006-01-12 01:56:58.586598
described_state: waiting_response
calculated_state: waiting_response
-useful_incoming_message_event:
+useful_incoming_message_event:
id: 906
params_yaml: "--- \n\
:incoming_message_id: 2\n"
incoming_message_id: 2
info_request_id: 105
event_type: response
- created_at: 2007-11-13 18:09:20.042061
+ created_at: 2007-11-13 18:00:20
described_state: successful
calculated_state: successful
diff --git a/spec/fixtures/info_requests.yml b/spec/fixtures/info_requests.yml
index 89c53e9f3..69f51a9e4 100644
--- a/spec/fixtures/info_requests.yml
+++ b/spec/fixtures/info_requests.yml
@@ -45,7 +45,7 @@ boring_request:
another_boring_request:
id: 106
title: The cost of boring
- url_title: the_cost_of_boring_2
+ url_title: the_cost_of_boring_two # Not _2, because we want to avoid the search collapsing these two
created_at: 2006-01-12 01:56:58.586598
updated_at: 2007-11-13 18:09:20.042061
public_body_id: 5
diff --git a/spec/fixtures/raw_emails.yml b/spec/fixtures/raw_emails.yml
index 6c5b6a6bb..d2c591812 100644
--- a/spec/fixtures/raw_emails.yml
+++ b/spec/fixtures/raw_emails.yml
@@ -4,11 +4,11 @@
# of the search functions, so if you use either of these words
# in the email text then some tests will have to be updated.
-useless_raw_email:
+useless_raw_email:
id: 1
-useful_raw_email:
+useful_raw_email:
id: 2
-another_useful_raw_email:
+another_useful_raw_email:
id: 3