Method |
Description |
|
setUp ( ) |
|
|
testBuildCollectionWhenOnIndexAction ( ) |
Should build a collection when on index action |
|
testBuildNewResourceForNamespacedControllerAndNamespacedModelWithAssociativeArrayIfParamIdIsNotSpecified ( ) |
Should build a new resource for namespaced controller and namespaced model with hash if params[:id] is not specified |
|
testBuildNewResourceNamespacedModelWithAssociativeArrayIfParamIdIsNotSpecified ( ) |
Should build a new resource for namespaced model with hash if params[:id] is not specified |
|
testBuildNewResourceWithAssociativeArrayIfParamIdIsNotSpecified ( ) |
Should build a new resource with hash if params[:id] is not specified |
|
testCreateThroughNamespacedParams ( ) |
Should store through the namespaced params |
|
testHasSpecifiedNestedResourceClassWithSlashedNamespace ( ) |
Has the specified nested resource_class when using '/' for namespace |
|
testLoadResourceForNamespacedController ( ) |
Should properly load resource for namespaced controller |
|
testLoadResourceInstanceWithParamId ( ) |
Should load the resource into an instance variable if $params['id'] is specified |
|
testLoadResourceWithSameNamespaceAsControllerWithBackslashedNamespace ( ) |
Should attempt to load a resource with the same namespace as the controller when using '\' for namespace |
|
testNotLoadResourceInstanceIfAlreadySet ( ) |
Should not load resource into an instance variable if already set |
|
testProperlyDetectNamespacesResourceControllerWithBackslashedNamespace ( ) |
Should properly detect namespaces for resource and controller when using '\' for namespace |
|
testProperlyDetectRootNamespaceResourceNamespacedControllerWithBackslashedNamespace ( ) |
Should properly detect root namespace of resource for namespaced controller when using '\' for namespace |
|
testProperlyLoadResourceNamespacedControllerWithBackslashedNamespace ( ) |
Should properly load resource for namespaced controller when using '\' for namespace |
|
testShouldAllowFullFindMethodToBePassedIntoFindByOption ( ) |
Should allow full find method to be passed into findBy option |
|
testShouldAlwaysConvertIdParamToString ( ) |
Should always convert id param to string |
|
testShouldAuthorizeBasedOnResourceNameIfClassIsFalse ( ) |
Should authorize based on resource name if class is false |
|
testShouldAuthorizeNestedResourceThroughParentAssociationOnIndexAction ( ) |
Should authorize nested resource through parent association on index action |
|
testShouldAuthorizeParentResourceInCollectionAction ( ) |
Should authorize parent resource in collection action |
|
testShouldBeAParentResourceWhenNameIsProvidedWhichDoesntMatchController ( ) |
Should be a parent resource when name is provided which doesn't match controller |
|
testShouldBeParentIfSpecifiedInOptions ( ) |
// Should be parent if specified in options |
|
testShouldBuildAResourceWhenOnCustomCreateActionEvenWhenParamsIdExists ( ) |
Should build a resource when on custom create action even when $this->params['id'] exists |
|
testShouldBuildRecordThroughHasOneAssociationWithSingletonAndShallowOptions ( ) |
Should build record through hasOne association with 'singleton' and 'shallow' options |
|
testShouldCallClosureWhenAnInstanceVariableIsPassed ( ) |
Should call Closure when an instance variable is passed |
|
testShouldCallLoadResourceAndAuthorizeResourceForLoadAndAuthorizeResource ( ) |
Should call loadResource and authorizeResource for loadAndAuthorizeResource |
|
testShouldFindRecordThroughHasOneAssociationWithSingletonAndShallowOptions ( ) |
Should find record through hasOne association with 'singleton' and 'shallow' options |
|
testShouldFindRecordThroughHasOneAssociationWithSingletonOptionWithoutIdParam ( ) |
Should find record through hasOne association with 'singleton' option without id param |
|
testShouldHaveTheSpecifiedResourceClassIfNameIsPassedToLoadResource ( ) |
Should have the specified resource_class if 'name' is passed to loadResource() |
|
testShouldLoadACollectionResourceWhenOnCustomActionWithNoIdParam ( ) |
// Should load a collection resource when on custom action with no id param |
|
testShouldLoadAndAuthorizeUsingCustomInstanceName ( ) |
Should load and authorize using custom instance name |
|
testShouldLoadCollectionResourceWhenDefiningAuthorityRulesThroughClosure ( ) |
Should not use load collection when defining Authority rules through a Closure |
|
testShouldLoadParentResourceThroughProperIdParameter ( ) |
Should load parent resource through proper id parameter |
|
testShouldLoadResourceThroughCustomMethodOfTheController ( ) |
Should load resource through a custom method of the controller |
|
testShouldLoadResourceThroughTheAssociationOfAnotherParentResourceUsingGetterMethod ( ) |
Should load resource through the association of another parent resource using getter method |
|
testShouldLoadResourceThroughTheAssociationOfAnotherParentResourceUsingInstanceVariable ( ) |
Should load resource through the association of another parent resource using instance variable |
|
testShouldLoadResourceThroughTheAssociationOfAnotherParentResourceUsingMethod ( ) |
Should load resource through the association of another parent resource using method |
|
testShouldLoadResourceThroughTheCustomAssociationName ( ) |
Should load resource through the custom association name |
|
testShouldLoadResourceUsingCustomFindByAttribute ( ) |
Should load resource using custom findByAttribute |
|
testShouldLoadResourceUsingCustomIDParam ( ) |
Should load resource using custom ID param |
|
testShouldLoadResourceUsingCustomQuery ( ) |
Should load resource using custom query where('attribute_name', $attribute); |
|
testShouldLoadTheModelUsingACustomClass ( ) |
Should load the model using a custom class |
|
testShouldLoadTheModelUsingACustomNamespacedClass ( ) |
Should load the model using a custom namespaced class |
|
testShouldLoadThroughFirstMatchingIfMultipleAreGiven ( ) |
Should load through first matching if multiple are given |
|
testShouldNotAuthorizeSingleResourceInCollectionAction ( ) |
Should not authorize single resource in collection action |
|
testShouldNotBeAParentResourceWhenNameIsProvidedWhichMatchesController ( ) |
// Should not be a parent resource when name is provided which matches controller |
|
testShouldNotBeParentIfSpecifiedInOptions ( ) |
// Should not be parent if specified in options |
|
testShouldNotBuildASingleResourceWhenOnCustomCollectionActionEvenWithId ( ) |
Should not build a single resource when on custom collection action even with id |
|
testShouldNotBuildRecordThroughHasOneAssociationWithSingletonOptionBecauseItCanCauseItToDeleteItInTheDatabase ( ) |
Should not build record through hasOne association with 'singleton' option because it can cause it to delete it in the database |
|
testShouldNotCallClosureWhenOnlyClassNameIsPassedOnlyReturnTrue ( ) |
Should not call Closure when only class name is passed, only return true |
|
testShouldNotLoadThroughParentResourceIfInstanceIsntLoadedWhenShallow ( ) |
Should not load through parent resource if instance isn't loaded when shallow |
|
testShouldNotTryToLoadResourceForOtherActionIfParamsIdIsUndefined ( ) |
Should not try to load resource for other action if $this->params['id'] is undefined |
|
testShouldOnlyAuthorizeShowActionOnParentResource ( ) |
Should only authorize 'show' action on parent resource |
|
testShouldPerformAuthorizationUsingControllerActionAndLoadedModel ( ) |
Should perform authorization using controller action and loaded model |
|
testShouldPerformAuthorizationUsingControllerActionAndNonLoadedModel ( ) |
Should perform authorization using controller action and non loaded model |
|
testShouldRaiseAccessDeniedWhenAttemptingToLoadResourceThroughNull ( ) |
Should raise AccessDenied when attempting to load resource through null |
|