Skip to content
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

Set 404 exception if dataset ID isn't found. #4379

Open
wants to merge 8 commits into
base: 2.x
Choose a base branch
from

Conversation

beeyayjay
Copy link
Contributor

Fixes [issue#]
6711

QA Steps

  • Open the developer tools and view the network tab
  • Go to /dataset/{id} where id is not an existing identifier for example /dataset/test123
  • Verify that the response status code is 404

@beeyayjay beeyayjay force-pushed the missing-dataset-404 branch from 24caef8 to d57c3e3 Compare January 14, 2025 16:38
@beeyayjay beeyayjay force-pushed the missing-dataset-404 branch from d57c3e3 to 21d87a2 Compare January 14, 2025 16:42
use Drupal\Tests\BrowserTestBase;
use GuzzleHttp\RequestOptions;

class DatasetControllerTest extends BrowserTestBase {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't actually testing the dkan_js_frontend controller, because the module is not enabled for this test. It's getting a 404 because it's not a valid URL either way, but it's just coming from normal Drupal routing and node controller. That's why it's getting flagged for test coverage.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dafeder. That hadn't occurred to me. I'll fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants