public function testEditSocietyWithScope() { $this->login('*****@*****.**', 'password'); $this->createSocietyWithOwner(); $token = $this->performOAuthUserLogin('api_write_org'); $params = array('society' => array('name' => 'New name')); $this->client->request('PATCH', '/societies/test-society.json?access_token=' . $token, $params); $this->assertEquals(201, $this->client->getResponse()->getStatusCode()); }