aboutsummaryrefslogtreecommitdiff
path: root/spec/chotto_spec.rb
diff options
context:
space:
mode:
authormms <git@sapka.me>2024-11-22 23:35:51 +0100
committermms <git@sapka.me>2024-11-22 23:37:42 +0100
commitc2623f1aa3638c988026b28f6a4131df6c61e0c6 (patch)
treec9a685d2997214bcb90f3659febc56f7ac85cbbb /spec/chotto_spec.rb
parent64ab548e16fdc8fa862e2b432464f3d67f5d9db8 (diff)
feat: allow to search for thread
Diffstat (limited to 'spec/chotto_spec.rb')
-rw-r--r--spec/chotto_spec.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/spec/chotto_spec.rb b/spec/chotto_spec.rb
index 41d949c..7593a48 100644
--- a/spec/chotto_spec.rb
+++ b/spec/chotto_spec.rb
@@ -12,7 +12,6 @@ describe Chotto do
before do
$db_double = db_double # we need to access this double within block evaled elsewhere
- p $db_double
allow(db_double).to receive(:new).with('/path', mode: Notmuch::MODE_READ_WRITE).and_return(db_instance_double)
allow(db_instance_double).to receive(:query).with(' (from:baltar@galactica.com)').and_return(db_query_double)
@@ -36,7 +35,7 @@ describe Chotto do
end
it 'sends the rules to Notmuch - scenario 1' do
- expect(message_double).to receive(:tags).and_return([])
+ expect(message_double).to receive(:tags)
expect(message_double).to receive(:header).with('Subject').and_return('Number Six')
expect(message_double).to receive(:remove_all_tags)
expect(message_double).to receive(:add_tag).with('todo')
@@ -46,7 +45,7 @@ describe Chotto do
end
it 'sends the rules to Notmuch - scenario 2' do
- expect(message_double).to receive(:tags).and_return([])
+ expect(message_double).to receive(:tags)
expect(message_double).to receive(:header).with('Subject').and_return('Boomer')
expect(message_double).to receive(:remove_all_tags)
expect(message_double).to receive(:add_tag).with('spam')