magellan-cli 0.7.2 → 0.7.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f4bf8cf10414fd6cffd72e89c542974f10d16b93
4
- data.tar.gz: 41f9dd2683c225bc7aff323ff070325a5ab973e5
3
+ metadata.gz: 42f93c40c0530fe9de00293a796186c0c301b80f
4
+ data.tar.gz: 02bb60ac905e4c91e6b4c363a78b676c1d2aea51
5
5
  SHA512:
6
- metadata.gz: d633fcc68c3b8be9ccf509236dbc11346179958055230aded9abd74f444231449a8b4e2deae70a98541d908cebdad124ccf57d0cd940dd626fd35382c8d1f1c7
7
- data.tar.gz: a92f6de984cc8f7cfde20c380fd2e415c9d38c49df0161ef1d1bc2f20bf0c09f8ec60110a0f241d0b7228296008fc932feebcd5f68162e881c6c8fa86510fffd
6
+ metadata.gz: 119dfa2d5e61b72d06f4d269a0b997ccbd6e22081a552756e4d637cac62e92a2ae3014418dd6e73c9003e234977e97a213b8eeafb2a78f44ef0fd2b98fc1f815
7
+ data.tar.gz: f785e4eb5d0c696cb2bd3bef14ebf86229f5d12312315cf0771fad03af117913a687de25b66724a8c6e421340f8ca6124229d11137b25c9cb39d388f98152e68
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- magellan-cli (0.7.2)
4
+ magellan-cli (0.7.3)
5
5
  activesupport (~> 4.1.4)
6
6
  groovenauts-thor
7
7
  httpclient (~> 2.5)
@@ -6,6 +6,8 @@ module Magellan
6
6
  module Resources
7
7
 
8
8
  class Team < Base
9
+ include Deletable
10
+
9
11
  self.resource_key = "magellan~auth~team"
10
12
  self.resource_dependency = { "organization" => Organization.parameter_name }
11
13
  self.field_associations = {"organization_id" => {name: "organization", class: "Organization"} }
@@ -1,5 +1,5 @@
1
1
  module Magellan
2
2
  module Cli
3
- VERSION = "0.7.2"
3
+ VERSION = "0.7.3"
4
4
  end
5
5
  end
@@ -53,4 +53,23 @@ describe Magellan::Cli::Resources::Team do
53
53
  end
54
54
  end
55
55
 
56
+ describe :delete do
57
+ let(:team_id){ 5 }
58
+ let(:team_name){ "team99" }
59
+ let(:team_list_response) { [ { "id" => team_id, "name" => team_name } ] }
60
+ before do
61
+ expected_params = {
62
+ "f[name][15][o]"=>"is",
63
+ "f[name][15][v]"=> team_name,
64
+ "f[organization][16][o]"=>"is",
65
+ "f[organization][16][v]"=>1
66
+ }
67
+ allow(http_conn).to receive(:get_json).with("/admin/magellan~auth~team.json", expected_params).and_return(team_list_response)
68
+ allow(http_conn).to receive(:delete).with("/admin/magellan~auth~team/5/delete")
69
+ end
70
+ it do
71
+ cmd.delete(team_name)
72
+ end
73
+ end
74
+
56
75
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: magellan-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - akm2000
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-13 00:00:00.000000000 Z
11
+ date: 2015-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httpclient