-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FIX continue browsing button not working correctly #35
Conversation
{ | ||
return Director::absoluteBaseURL(); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the semantic difference between a DMSDocumentCartController and a DMSCartController? If this is intended to be a base controller for both maybe call it DMSCartAbstractController or something that indicates that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good suggestion. Yes, it is intended as a base controller. Will rename as suggested.
{ | ||
return Director::absoluteBaseURL(); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have some tests for this class?
{ | ||
$this->controller = DMSCheckoutController::create(); | ||
$this->assertSame('checkout', $this->controller->Link()); | ||
$this->assertSame('checkout/complete', $this->controller->Link('complete')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This behaviour belongs in the checkout controller test class - this test class should test the logic in the abstract controller
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When 'updating' the cart items the 'continue browsing' link should go back to the documents not back into the 'checkout' page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just @sachajudd's comments. Code wise this is good.
{ | ||
$this->assertSame('documentcart', $this->controller->Link()); | ||
$this->assertSame('documentcart/view', $this->controller->Link('view')); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change seems redundant, but is just copy pasting. Please avoid in future.
Fixes #32.