You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: slack_notifier_test.rb
    path of file: ./repos/data_checks/test/notifiers
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require "test_helper"

class SlackNotifierTest < Minitest::Test
  def setup
    config.notifier :slack, webhook_url: "https://hooks.slack.com/services/abc"
  end

  def teardown
    super
    User.delete_all
  end

  def test_slack
    config.ensure_no :users_without_ema
    
  def test_slack_with_error
    config.ensure_no :users_without_emails do
      raise "Query timed out"
    end

    payload = {
      attachments: [
        {
          title: "Check Error: users_without_emails",
          text: "Query timed out",
          color: "danger",
        },
      ],
    }

    stub_post = stub_request(:post, "https://hooks.slack.com/services/abc")
      .with(body: payload.to_json)
      .to_return(body: "ok")

    run_checks

    assert_requested stub_post
  end