diff options
author | Z.J. van de Weg <git@zjvandeweg.nl> | 2016-12-15 20:19:42 +0100 |
---|---|---|
committer | Z.J. van de Weg <git@zjvandeweg.nl> | 2016-12-16 12:31:51 +0100 |
commit | 0045996728308bcb7643618ab48efb7e04e7d4bf (patch) | |
tree | 91041209a3f78164afb0598f82ec9fc14667f968 /spec/lib/mattermost | |
parent | 99d8d6f0d48e28f5ba798d1d4461071a01435054 (diff) | |
download | gitlab-ce-0045996728308bcb7643618ab48efb7e04e7d4bf.tar.gz |
Add auto configure of commands
Diffstat (limited to 'spec/lib/mattermost')
-rw-r--r-- | spec/lib/mattermost/team_spec.rb | 19 |
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 |