blob: 5e6f44518a82e0570016dae9c19337a8a885bcde (
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'
describe Mattermost::DeployService, services: true do
let(:project) { create(:empty_project) }
let(:user) { create(:user) }
let(:service) { described_class.new(project, user, params) }
shared_examples 'a 404 response' do
it 'responds with a 404 message' do
expect(subject[:response_type]).to be :ephemeral
expect(subject[:text]).to start_with '404 not found!'
end
end
describe '#execute' do
let(:params) { { text: 'envname to action' } }
subject { service.execute }
context 'when the environment can not be found' do
it_behaves_like 'a 404 response'
end
context 'the environment exists' do
end
end
end
|