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

Add tests for routes to protect them #736

Open
jywarren opened this issue Oct 5, 2021 · 4 comments
Open

Add tests for routes to protect them #736

jywarren opened this issue Oct 5, 2021 · 4 comments

Comments

@jywarren
Copy link
Member

jywarren commented Oct 5, 2021

Based on this PR: publiclab/plots2#10242

we can protect routes; a lot of routes were broken in a recent upgrade: https://github.com/publiclab/spectral-workbench/search?q=route&type=issues

Let's make a big list of them - you can see recently fixed ones in the "blame" view of https://github.com/publiclab/spectral-workbench/blame/main/config/routes.rb - and create first-timers-only issues to add route tests for them! Since they're tests, they'll be really easy to review and approve.

@jywarren
Copy link
Member Author

jywarren commented Oct 5, 2021

The format for a routes test is:

	test "test user_sessions create route" do
	    assert_routing({ path: '/user_sessions', method: :post }, { controller: 'user_sessions', action: 'create' })
	end

@Tlazypanda
Copy link
Collaborator

Ohh this is a great idea! @jywarren Will open some ftos based off this and possibly an issue in plots2 as well to get contributors to this repo ✌️

@mskalisz
Copy link
Contributor

mskalisz commented Dec 2, 2021

Hi! I've completed a FTO issue - I'm still pretty new to contributing to open source but I'm wondering if there is anything I can do to help with this issue? Is the list complete, or can I help to create some more FTO issues? Thank you!

@Tlazypanda
Copy link
Collaborator

Hey @mskalisz Feel free to open more FTO issues based on this 💯 . I usually look out for the routes that are recently added/modified for the tests?

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

No branches or pull requests

3 participants