aboutsummaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authormms <git@sapka.me>2024-11-18 20:59:45 +0100
committermms <git@sapka.me>2024-11-18 21:00:08 +0100
commit8004fd7f9fc91ce9ec02b1b8e8eac639b17d0eb8 (patch)
tree88438de57c315eba59791611f11260f005610cda /spec/lib
parent786a3ae9ffd25cc6482fbb7c6358afc3421abfb3 (diff)
feat: order
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/.messages_spec.rb.swpbin0 -> 12288 bytes
-rw-r--r--spec/lib/messages_spec.rb6
2 files changed, 6 insertions, 0 deletions
diff --git a/spec/lib/.messages_spec.rb.swp b/spec/lib/.messages_spec.rb.swp
new file mode 100644
index 0000000..98cda14
--- /dev/null
+++ b/spec/lib/.messages_spec.rb.swp
Binary files 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