summaryrefslogtreecommitdiff
path: root/spec/lib/mattermost
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/mattermost')
-rw-r--r--spec/lib/mattermost/team_spec.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/lib/mattermost/team_spec.rb b/spec/lib/mattermost/team_spec.rb
new file mode 100644
index 00000000000..a3b0831659f
--- /dev/null
+++ b/spec/lib/mattermost/team_spec.rb
@@ -0,0 +1,19 @@
+require 'spec_helper'
+
+describe Mattermost::Team do
+ let(:session) { Mattermost::Session.new('http://localhost:8065/', nil) }
+
+ describe '.all' do
+ let(:result) { {id: 'abc', display_name: 'team'} }
+ before do
+ WebMock.stub_request(:get, 'http://localhost:8065/api/v3/teams/all').
+ and_return({ abc: result }.to_json)
+ end
+
+ xit 'gets the teams' do
+ allow(session).to receive(:with_session) { yield }
+
+ expect(described_class.all).to eq(result)
+ end
+ end
+end