Welcome to mirror list, hosted at ThFree Co, Russian Federation.

mail_google_schema_whitelisting.rb « gitlab « tasks « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 22e746870dc701cee6518b165970ff49df06a442 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
require 'spec_helper'
require 'rake'

describe 'gitlab:mail_google_schema_whitelisting rake task' do
  before :all do
    Rake.application.rake_require "tasks/gitlab/task_helpers"
    Rake.application.rake_require "tasks/gitlab/mail_google_schema_whitelisting"
    # empty task as env is already loaded
    Rake::Task.define_task :environment
  end

  describe 'call' do
    before do
      # avoid writing task output to spec progress
      allow($stdout).to receive :write
    end

    let :run_rake_task do
      Rake::Task["gitlab:mail_google_schema_whitelisting"].reenable
      Rake.application.invoke_task "gitlab:mail_google_schema_whitelisting"
    end

    it 'should run the task without errors' do
      expect { run_rake_task }.to_not raise_error
    end
  end
end