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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/magellan/cli/resources/team.rb +2 -0
- data/lib/magellan/cli/version.rb +1 -1
- data/spec/magellan/cli/resources/team_spec.rb +19 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42f93c40c0530fe9de00293a796186c0c301b80f
|
4
|
+
data.tar.gz: 02bb60ac905e4c91e6b4c363a78b676c1d2aea51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 119dfa2d5e61b72d06f4d269a0b997ccbd6e22081a552756e4d637cac62e92a2ae3014418dd6e73c9003e234977e97a213b8eeafb2a78f44ef0fd2b98fc1f815
|
7
|
+
data.tar.gz: f785e4eb5d0c696cb2bd3bef14ebf86229f5d12312315cf0771fad03af117913a687de25b66724a8c6e421340f8ca6124229d11137b25c9cb39d388f98152e68
|
data/Gemfile.lock
CHANGED
@@ -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"} }
|
data/lib/magellan/cli/version.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2015-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|