From 8004fd7f9fc91ce9ec02b1b8e8eac639b17d0eb8 Mon Sep 17 00:00:00 2001 From: mms Date: Mon, 18 Nov 2024 20:59:45 +0100 Subject: feat: order --- spec/lib/.messages_spec.rb.swp | Bin 0 -> 12288 bytes spec/lib/messages_spec.rb | 6 ++++++ 2 files changed, 6 insertions(+) create mode 100644 spec/lib/.messages_spec.rb.swp (limited to 'spec/lib') diff --git a/spec/lib/.messages_spec.rb.swp b/spec/lib/.messages_spec.rb.swp new file mode 100644 index 0000000..98cda14 Binary files /dev/null and b/spec/lib/.messages_spec.rb.swp differ diff --git a/spec/lib/messages_spec.rb b/spec/lib/messages_spec.rb index 7550991..79551b7 100644 --- a/spec/lib/messages_spec.rb +++ b/spec/lib/messages_spec.rb @@ -68,4 +68,10 @@ RSpec.describe Chotto::Messages do .to eq(' (from:baltar@battlestar.com) or (from:adama@battestar.com) and (ship:battlestar) or (ship:pegasus)') } end + + context 'sorting order' do + it { expect(subject.filter('from:baltar@battlestar.com').order).to eq('oldest_first') } + it { expect(subject.filter('from:baltar@battlestar.com').newest_first.order).to eq('newest_first') } + it { expect(subject.filter('from:baltar@battlestar.com').newest_first.oldest_first.order).to eq('oldest_first') } + end end -- cgit v1.2.3