{"size": 567, "ext": "js", "max_stars_repo_path": "api_server/modules/teams/test/get_teams/acl_test.js", "max_stars_repo_name": "reneelpetit/codestream-server", "max_stars_repo_stars_event_min_datetime": "2021-01-22T19:38:12.000Z", "max_stars_repo_stars_event_max_datetime": "2021-01-22T19:38:12.000Z", "max_issues_repo_path": "api_server/modules/teams/test/get_teams/acl_test.js", "max_issues_repo_name": "reneelpetit/codestream-server", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "api_server/modules/teams/test/get_teams/acl_test.js", "max_forks_repo_name": "reneelpetit/codestream-server", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 18.9, "max_line_length": 101, "alphanum_fraction": 0.6543209877}
'use strict';

const GetTeamsTest = require('./get_teams_test');

class ACLTest extends GetTeamsTest {

	get description () {
		return 'should return an error when trying to fetch teams including one that i\'m not a member of';
	}

	getExpectedError () {
		return {
			code: 'RAPI-1009'	 // readAuth
		};
	}

	setPath (callback) {
		// include the "foreign" team in the IDs, this should fail
		let ids = [
			this.team.id,
			this.teamWithMe.id,
			this.teamWithoutMe.id
		];
		this.path = '/teams?ids=' + ids.join(',');
		callback();
	}
}

module.exports = ACLTest;
