discourse_api 0.22.0 → 0.23.0
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/CHANGELOG.md +5 -1
- data/lib/discourse_api/api/users.rb +4 -0
- data/lib/discourse_api/version.rb +1 -1
- data/spec/discourse_api/api/users_spec.rb +15 -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: ee44c6527e47d55c63c5353e2809ade365badbe4
|
4
|
+
data.tar.gz: 145d522257eab65469e2c7ea4eb4de5a8c3f3fc9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41a5eff5e2224de784c3da8b595519f97fb210e8d48fe28f1170c59c2142a515ac6c2fc73b152c72221f6153e6dffe4dd1ccff3768fec7cd5136ec27dffa1ad5
|
7
|
+
data.tar.gz: 8fcd43d8a93551be14075e70672a88416c3246881b8bc996276310a6262d67ce23e7000c35257ccddb54851f26d11c5cd2d28c3cac05b21bc64df5e192c9f207
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
4
4
|
|
5
|
+
## [0.23.0] - 2018-05-24
|
6
|
+
### Added
|
7
|
+
- Added `delete_user` method
|
8
|
+
|
5
9
|
## [0.22.0] - 2018-05-04
|
6
10
|
### Added
|
7
11
|
- Support for subfolder paths
|
@@ -23,7 +27,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
23
27
|
|
24
28
|
## [0.18.0] - 2017-10-17
|
25
29
|
### Added
|
26
|
-
- Added update_group API call
|
30
|
+
- Added `update_group` API call
|
27
31
|
### Fixed
|
28
32
|
- Fixed params for create groups endpoint
|
29
33
|
- Fixed invite token API endpoint
|
@@ -269,4 +269,19 @@ describe DiscourseApi::API::Users do
|
|
269
269
|
expect(result.status).to eq(200)
|
270
270
|
end
|
271
271
|
end
|
272
|
+
|
273
|
+
describe "#delete_user" do
|
274
|
+
before do
|
275
|
+
url = "http://localhost:3000/admin/users/11.json?delete_posts=true&api_key=test_d7fd0429940&api_username=test_user"
|
276
|
+
stub_delete(url).to_return(body: '{"deleted": true}', status: 200)
|
277
|
+
end
|
278
|
+
|
279
|
+
it "makes the correct delete request" do
|
280
|
+
result = subject.delete_user(11, true)
|
281
|
+
url = "http://localhost:3000/admin/users/11.json?delete_posts=true&api_key=test_d7fd0429940&api_username=test_user"
|
282
|
+
expect(a_delete(url)).to have_been_made
|
283
|
+
expect(result.body).to eq('{"deleted": true}')
|
284
|
+
expect(result.status).to eq(200)
|
285
|
+
end
|
286
|
+
end
|
272
287
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: discourse_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.23.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Saffron
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2018-05-
|
14
|
+
date: 2018-05-24 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: faraday
|