summaryrefslogtreecommitdiff
path: root/modules/rest/tests/Rest_Controller_Test.php
AgeCommit message (Collapse)Author
2013-01-21Update copyright to 2013. Fixes #1953.Bharat Mediratta
2012-02-27Update copyright to 2012. #1822Bharat Mediratta
2011-01-21Update copyright to 2011.Bharat Mediratta
2010-07-27Update the mock so that all responses return arrays, not stdClass().Bharat Mediratta
2010-06-18Simplify rest::get_access_key($user) to rest::access_key() thatBharat Mediratta
returns just the access key string for the active user. That's how we use the API, so keep it simple.
2010-04-17Update tests to reflect recent changes to the REST API.Bharat Mediratta
2010-03-30Rename "access_token" to "access_key" in the code for consistency.Bharat Mediratta
2010-03-30Rename "user_access_tokens" table to "user_access_keys" as step 1 of aBharat Mediratta
multi step process to refer to REST access keys as "access_key" everywhere. Bump the rest module to version 2.
2010-03-05Update tests to reflect the fact that you have to be logged in to do anything.Bharat Mediratta
2010-03-03Update the copyright to 2010. It's only 3 months into the year :-)Bharat Mediratta
2010-01-31Fix lots of warnings that pop up when we're in E_STRICT mode. They'reBharat Mediratta
mostly issues around uninitialized variables, calling non-static functions in a static context, calling Session functions directly instead of on its singleton, passing non-variables by reference, and subclasses not using the same interface as the parent class.
2010-01-23Update tests for recent REST changes.Bharat Mediratta
2010-01-20Rewrite the tests to be simpler and more direct.Bharat Mediratta
2010-01-19Let the Rest_Controller functions throw a Rest_Exception sinceBharat Mediratta
the Kohana framework will handle it properly.
2010-01-19Extend Gallery_Unit_Test_Case instead of Unit_Test_Case.Bharat Mediratta
2010-01-03Simplify the REST API code. Here's what I did:Bharat Mediratta
1) Simplify gallery_rest to return flat models, no children and do no validation for now. 2) Flatten the REST replies and use HTTP codes to indicate success/failure instead of additional status messages. 3) Use the message and error code support in the base Exception class, instead of brewing our own in Rest_Exception. 4) Get rid of rest::success() and rest::fail() -- we only need rest::reply() since all failures are covered by throwing an exception. 5) Get rid of /rest/access_key and just use /rest for authentication. 6) Inline and simplify rest::normalize_request since we only use it once 7) Change rest::set_active_user to succeed or throw an exception 8) Extract Rest_Exception::sendHeaders into rest::send_headers() Here's what's currently broken: 1) Data validation. There currently is none 2) Logging. That's gone too 3) image block and tag code is broken 4) Tests are broken 5) No movie support
2010-01-02Correct file structure tests, Have the tests delete the userid they create ↵Tim Almdal
so as not to impact other tests.
2009-12-31Only create the user or the target photo in the tests that require it.Tim Almdal
2009-12-31Create a Rest_Exception class and use it to convey status to the client ↵Tim Almdal
instead of calling rest::forbidden and other rest helper error messages.
2009-12-27Clean up validation the check for duplicate names or slugs, finish ↵Tim Almdal
converting the rest API to Kohana 2.4
2009-12-23When normalizing the rest request don't assume that the additional arguments ↵Tim Almdal
are acutall a path. Leave it up to the handler to determine.
2009-12-23Updated the unit tests to match the current APITim Almdal
Corrected a problem identified with the unit tests... failed if the path was empty on PUT.
2009-12-09Use the relative url cache to look up resources instead of the relative ↵Tim Almdal
path. This allows us to forego the extension as part of the REST url. As well, urls are consistent between normal usage and rest usage.
2009-12-08Add the REST get handler for albums/photos/moviesTim Almdal
2009-12-08Change the url mapping so that path to the is part of the urlTim Almdal
The request key is put in the X-Gallery-Request-Key header The HTTP method can be override by using the X-Gallery-Request-Method header Normalize the request data so that it doesn't matter where it comes from (HTTP get or HTTP post request)
2009-12-08Rename the backing table from rest_keys to user_access_tokensTim Almdal
Implement an api to format the errors and success messages Removed the custom routing... urls are now /rest/<module_name>/<resource>
2009-12-07The rest framework that the new gallery3 remote interface will be built on. ↵Tim Almdal
At the moment, there are no handlers to perform any functionality.