From d650cdddaec072d6249992ae6a254070fdda6864 Mon Sep 17 00:00:00 2001 From: Seb Bacon Date: Wed, 18 Jan 2012 11:08:29 +0000 Subject: Don't raise an error if the user deletes a track through the UI. Fixes #353. --- spec/models/track_thing_spec.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'spec/models') diff --git a/spec/models/track_thing_spec.rb b/spec/models/track_thing_spec.rb index 4922a96c7..7891bd229 100644 --- a/spec/models/track_thing_spec.rb +++ b/spec/models/track_thing_spec.rb @@ -28,6 +28,13 @@ describe TrackThing, "when tracking changes" do found_track.should == @track_thing end + it "can display the description of a deleted track_thing" do + track_thing = TrackThing.create_track_for_search_query('fancy dog') + description = track_thing.track_query_description + track_thing.destroy + track_thing.track_query_description.should == description + end + it "will make some sane descriptions of search-based tracks" do tests = [['bob variety:user', "users matching text 'bob'"], ['bob (variety:sent OR variety:followup_sent OR variety:response OR variety:comment) (latest_status:successful OR latest_status:partially_successful OR latest_status:rejected OR latest_status:not_held)', "requests which are successful or unsuccessful or comments matching text 'bob'"], -- cgit v1.2.3