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

release_env_spec.rb « middleware « gitlab « lib « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a5bda23b38be81e93aea59239a3412170fa95e12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

require 'fast_spec_helper'

RSpec.describe Gitlab::Middleware::ReleaseEnv do
  let(:inner_app) { double(:app, call: 'yay') }
  let(:app) { described_class.new(inner_app) }
  let(:env) { { 'action_controller.instance' => 'something' } }

  describe '#call' do
    it 'calls the app and clears the env' do
      result = app.call(env)

      expect(result).to eq('yay')
      expect(env).to be_empty
    end
  end
end