export default (modelName, actionName, scopes, expectedScopeFilter) => {
  const scopesStr = scopes.length === 0 ? 'no scopes' : `${scopes.join(', ')} scope`;
  const token = createOrgToken(scopes);

  // if (!(actionName === 'view' && scopesStr === 'all scope' && modelName === 'dashboard')) {
  //   return;
  // }

  it(`should return the correct ${actionName} filter when using ${scopesStr} on ${modelName}`, async () => {
    const actualScopeFilter = await getModelScopeFilter(modelName, actionName, token, user);
    assert.deepEqual(actualScopeFilter, expectedScopeFilter);
  });
};
export default (modelName, actionName, scopes) => {
  const scopesStr = scopes.length === 0 ? 'no scopes' : `${scopes.join(', ')} scope`;
  const token = createOrgToken(scopes);

  it(`should throw error for ${actionName} filter when using ${scopesStr}`, async () => {
    try {
      await getModelScopeFilter(modelName, actionName, token, user);
      assert.equal(true, false, 'Expected an error to be thrown');
    } catch (err) {
      assert.equal(err.constructor, NoAccessError);
    }
  });
};