summaryrefslogtreecommitdiff
path: root/spec/helpers/todos_helper_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-07-09 09:09:27 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-07-09 09:09:27 +0000
commitc3b45354d720654215eb0e7b8e718ba6ea2d7a96 (patch)
tree359066e91bad08ae8e404bb43316705b7b53993e /spec/helpers/todos_helper_spec.rb
parent734708924b0f86ad3c23636bd6a8942d679daaf2 (diff)
downloadgitlab-ce-c3b45354d720654215eb0e7b8e718ba6ea2d7a96.tar.gz
Add latest changes from gitlab-org/gitlab@master
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