summaryrefslogtreecommitdiff
path: root/spec/helpers/todos_helper_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/helpers/todos_helper_spec.rb')
-rw-r--r--spec/helpers/todos_helper_spec.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/helpers/todos_helper_spec.rb b/spec/helpers/todos_helper_spec.rb
index 5b9168fb655..6b658a475b1 100644
--- a/spec/helpers/todos_helper_spec.rb
+++ b/spec/helpers/todos_helper_spec.rb
@@ -222,4 +222,24 @@ RSpec.describe TodosHelper do
end
end
end
+
+ describe '#todo_author_display?' do
+ using RSpec::Parameterized::TableSyntax
+
+ subject { helper.todo_author_display?(alert_todo) }
+
+ where(:action, :result) do
+ Todo::BUILD_FAILED | false
+ Todo::UNMERGEABLE | false
+ Todo::ASSIGNED | true
+ end
+
+ with_them do
+ before do
+ alert_todo.action = action
+ end
+
+ it { is_expected.to eq(result) }
+ end
+ end
end