Skip to content
Browse files

cleanup

  • Loading branch information...
1 parent d31b2df commit 8c6a57638cf4a183212a1b7af5d3223059618380 @theganyo committed
View
6 lib/usergrid/core/collection.rb
@@ -35,11 +35,11 @@ def each(&block)
end
def create_entity(data)
- response = self.post data
- response.entity
+ self.post data
end
+ alias_method :create_entities, :create_entity
- # options: 'reversed', 'start', 'cursor', 'limit', 'permission'
+ ## options: 'reversed', 'start', 'cursor', 'limit', 'permission'
#def update(new_data, query=nil, options={}) # todo: enable when server is fixed
# options = options.symbolize_keys
# @query_params = query ? options.merge({ql: query}) : options
View
2 spec/usergrid/core/application_spec.rb
@@ -258,7 +258,7 @@
roles.size.should == size
end
- it "should be able to create a new collection and access it" do # todo
+ it "should be able to create a new collection and access it" do
entities = (1..4).collect do |i|
{ name: "test_#{i}" }
end
View
5 spec/usergrid/core/collection_spec.rb
@@ -2,16 +2,15 @@
before :all do
@application = create_random_application
+ @user = create_random_user @application, true
@collection = @application['tests'].collection
@entity_data = []
(1..10).each do |i|
test = { name: "test_#{i}" }
@entity_data << test
- @collection.create_entity test
end
-
- @user = create_random_user @application, true
+ @collection.create_entities @entity_data
end
after :all do

0 comments on commit 8c6a576

Please sign in to comment.
Something went wrong with that request. Please try again.