File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change 1
1
require_relative '../../sdks/ruby/lib/appwrite'
2
2
3
+ query = Appwrite ::Query
4
+ permission = Appwrite ::Permission
5
+ role = Appwrite ::Role
6
+ id = Appwrite ::ID
7
+
3
8
client = Appwrite ::Client . new
4
9
client . add_header ( 'Origin' , 'http://localhost' )
5
10
97
102
puts error . message
98
103
end
99
104
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' )
You can’t perform that action at this time.
0 commit comments