Skip to content

Commit 722699e

Browse files
committed
feat: ruby tests
1 parent 336e0c1 commit 722699e

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

tests/languages/ruby/tests.rb

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
require_relative '../../sdks/ruby/lib/appwrite'
22

3+
query = Appwrite::Query
4+
permission = Appwrite::Permission
5+
role = Appwrite::Role
6+
id = Appwrite::ID
7+
38
client = Appwrite::Client.new
49
client.add_header('Origin', 'http://localhost')
510

@@ -97,4 +102,23 @@
97102
puts error.message
98103
end
99104

100-
general.empty()
105+
general.empty()
106+
107+
# Query helper tests
108+
puts query.equal('title', ['Spiderman', 'Dr. Strange'])
109+
puts query.notEqual('title', 'Spiderman')
110+
puts query.lesser('releasedYear', 1990)
111+
puts query.greater('releasedYear', [1990, 1999])
112+
puts query.search('name', 'john')
113+
114+
# Permission & Role helper tests
115+
puts permission.read(role.any())
116+
puts permission.write(role.user(id.custom('userid')))
117+
puts permission.create(role.users())
118+
puts permission.update(role.guests())
119+
puts permission.delete(role.team('teamId', 'owner'))
120+
puts permission.delete(role.team('teamId'))
121+
122+
# ID helper tests
123+
puts id.unique()
124+
puts id.custom('custom_id')

0 commit comments

Comments
 (0)