zm-ruby-client 0.18.0 → 0.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/zm/client/account/account.rb +1 -1
- data/lib/zm/client/version.rb +1 -1
- data/test/accounts.rb +16 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e477be30a69440be21ac3e5b18765740fb696edfc51774bc7591ca0cbfd5fa6
|
4
|
+
data.tar.gz: 0cf1765bff4390e229da1bd4ba9dbdca68f50e99b107cf7d85c8843eb17bd6ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce5e56422548fdc7161d6559f447c5c58e8d93b9dd3386a9d6d99d20e4271ac38e638a28e3ea3cda116fc27ccab3fa9f53fa3fa1d77d9ed52873f010c461cbeb
|
7
|
+
data.tar.gz: ef6f5bc1eb0b70582d142d189f31c11c4c0e6f0f73edcf4530cd4395e9e6290f094f9b67f24e937f481d70de2c7606bace543d11d48e500e031d88e40604f6e9
|
data/lib/zm/client/version.rb
CHANGED
data/test/accounts.rb
CHANGED
@@ -6,7 +6,6 @@ $LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../lib')
|
|
6
6
|
require './lib/zm/client'
|
7
7
|
|
8
8
|
class TestAccount < Minitest::Test
|
9
|
-
|
10
9
|
def setup
|
11
10
|
@admin = Zm::Client::Cluster.new(Zm::Client::ClusterConfig.new('./test/fixtures/config.yml'))
|
12
11
|
@admin.login
|
@@ -34,7 +33,7 @@ class TestAccount < Minitest::Test
|
|
34
33
|
assert accounts != @admin.accounts.where(@fixture_accounts['collections']['where']['domain']).all!
|
35
34
|
end
|
36
35
|
|
37
|
-
def
|
36
|
+
def test_where_count
|
38
37
|
assert @admin.accounts.where(@fixture_accounts['collections']['where']['domain']).count.is_a? Integer
|
39
38
|
end
|
40
39
|
|
@@ -60,13 +59,27 @@ class TestAccount < Minitest::Test
|
|
60
59
|
assert account.name == name
|
61
60
|
end
|
62
61
|
|
62
|
+
def test_create_account
|
63
|
+
name = @fixture_accounts['accounts']['toto']['email']
|
64
|
+
account = @admin.accounts.new do |acc|
|
65
|
+
acc.name = name
|
66
|
+
end
|
67
|
+
account.save!
|
68
|
+
assert !account.id.nil?
|
69
|
+
end
|
70
|
+
|
71
|
+
def test_delete_account
|
72
|
+
account = @admin.accounts.find_by name: @fixture_accounts['accounts']['toto']['email']
|
73
|
+
assert account.delete!
|
74
|
+
end
|
75
|
+
|
63
76
|
def test_attrs
|
64
77
|
account = @admin.accounts.attrs('zimbraMailQuota').find_by name: @fixture_accounts['accounts']['maxime']['email']
|
65
78
|
assert account.respond_to?(:zimbraMailQuota)
|
66
79
|
end
|
67
80
|
|
68
81
|
def test_has_quota
|
69
|
-
accounts = @admin.accounts.where('
|
82
|
+
accounts = @admin.accounts.where(@fixture_accounts['collections']['where']['quota']).per_page(10).attrs('zimbraMailQuota').all
|
70
83
|
assert accounts.any?
|
71
84
|
|
72
85
|
accounts.each do |account|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zm-ruby-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.18.
|
4
|
+
version: 0.18.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maxime Désécot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -264,7 +264,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
264
264
|
- !ruby/object:Gem::Version
|
265
265
|
version: '0'
|
266
266
|
requirements: []
|
267
|
-
rubygems_version: 3.
|
267
|
+
rubygems_version: 3.1.6
|
268
268
|
signing_key:
|
269
269
|
specification_version: 4
|
270
270
|
summary: zm-ruby-client
|