Skip to content

Adds Missing Filter Test Cases

Dillon Wheeler requested to merge adds_missing_tests into master

MR Overview

While working on !298 (merged) it was noticed that we do not have any test cases ensuring that a number of filters are working correctly from the engine class. (Seen in screenshot below)

Missing Tests Screenshot. Lines 427, 443, 452, 456, and 460 are not being hit by the current test suite

Adding testing for lines 427, 443, 452, 456, and 460 will help to ensure that we are not breaking the Gems current functionality before we merge in MR !298 (merged).

Test Cases To Write

  • Line 427 - When conditions[:date] and resource[:type] is branches EXPECT: To use BrancheDateFilter
  • Line 443 - When NOT conditions[:date] and resource[:type] == branches EXPECT: To use BranchProtectedFilter
  • Line 452 - When NOT conditions[:date] and conditions[:no_additional_lables] exists EXPECT: To use NoAdditionalLabelsConditionsFilter
  • Line 456 - When NOT conditions[:date] and conditions[:author_member] exists EXPECT: To use AuthorMemberConditionsFilter
  • Line 460 - When NOT conditions[:date] and conditions[:assignee_member] exists EXPECT: To use AssigneeMemberConditionsFilter
Edited by Dillon Wheeler

Merge request reports