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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-12-20 21:11:53 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2016-12-20 21:11:53 +0300
commit61d09a7b15ef9ae2e23359f1afb87b0adbda4dd4 (patch)
tree1cfeb2ebdd16c9972ad296416a4db48c30cc7637 /spec/lib/mattermost
parent0cf23fde7c666b64e6c18a92d29e632f51b00059 (diff)
WIP
Diffstat (limited to 'spec/lib/mattermost')
-rw-r--r--spec/lib/mattermost/command_spec.rb18
-rw-r--r--spec/lib/mattermost/team_spec.rb2
2 files changed, 9 insertions, 11 deletions
diff --git a/spec/lib/mattermost/command_spec.rb b/spec/lib/mattermost/command_spec.rb
index f38bb273e7d..ecf336e3199 100644
--- a/spec/lib/mattermost/command_spec.rb
+++ b/spec/lib/mattermost/command_spec.rb
@@ -1,19 +1,17 @@
require 'spec_helper'
describe Mattermost::Command do
- let(:session) { double("session") }
let(:hash) { { 'token' => 'token' } }
+ let(:user) { create(:user) }
- describe '.create' do
- before do
- allow(session).to receive(:post).and_return(hash)
- allow(hash).to receive(:parsed_response).and_return(hash)
- end
-
- it 'gets the teams' do
- expect(session).to receive(:post)
+ before do
+ Mattermost::Session.base_uri("http://mattermost.example.com")
+ end
- described_class.create(session, 'abc', url: 'http://trigger.com')
+ describe '#create' do
+ it 'creates a command' do
+ described_class.new(user).
+ create(team_id: 'abc', url: 'http://trigger.com')
end
end
end
diff --git a/spec/lib/mattermost/team_spec.rb b/spec/lib/mattermost/team_spec.rb
index c208be3912b..5d1fc6fc603 100644
--- a/spec/lib/mattermost/team_spec.rb
+++ b/spec/lib/mattermost/team_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe Mattermost::Team do
- describe '.team_admin' do
+ describe '#all' do
let(:session) { double("session") }
let(:response) do