instructure/canvas-lms — pull request #372 by mcgachey (2013-11-14 20:50:23+00:00)
Title: Add an API to create a sub-account.

This functionality already exists through the UI, but is currently missing
from the API. This feature is useful when populating a local installation
with test data through the API, and was also requested at
https://help.instructure.com/entries/22875265-Add-REST-API-for-Adding-Sub-Accounts

The changes adds a new route to POST to 'accounts/:account_id/sub_accounts',
the logic to handle a create request and a spec test to verify its behavior.

I have run the new spec locally (along with the other tests in
accounts_api_spec.rb), but have been unable to run the full test suite due
to the issues reported at
https://groups.google.com/forum/#!topic/canvas-lms-users/TcI0c6pTAUo