diff --git a/.github/tests/test/script_test.rb b/.github/tests/test/script_test.rb index 5c3a028..4a52167 100644 --- a/.github/tests/test/script_test.rb +++ b/.github/tests/test/script_test.rb @@ -99,10 +99,10 @@ def test_without_approval_main def test_approve_from_user user_name = 'softservedata' - classic_require_code_owner_review = @obj.rules_required_pull_request_reviews('main').nil? || @obj.rules_required_pull_request_reviews('develop')["require_code_owner_reviews"] + classic_require_code_owner_review = @obj.rules_required_pull_request_reviews('main').nil? pull_request_rulesets_rules = @obj.get_branch_ruleset('main') rulesets_require_code_owner_review = pull_request_rulesets_rules&.find { |rule| rule['type'] == 'pull_request' }&.[]('parameters')&.[]('require_code_owner_review') - assert_not_nil(classic_require_code_owner_review || rulesets_require_code_owner_review, "We should not allow merge to main branch without approve from #{user_name}") + assert(classic_require_code_owner_review || rulesets_require_code_owner_review, "We should not allow merge to main branch without approve from #{user_name}") end def test_PR_template_present