• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hypothesis / h / 16914 / 3
97%
master: 97%

Build:
DEFAULT BRANCH: master
Ran 25 Feb 2019 11:14PM UTC
Files 32
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

25 Feb 2019 11:14PM UTC coverage: 38.714%. First build
ACTION=frontend-lint

Pull #4154

travis-ci

Sean Hammond
Factor group join into separate view

Factor the group join page (the view for the 'group_read' route when the
user is logged-in but isn't a member of the group) into a separate view
callable.

Previously h.views.groups.read() was called for the 'group_read' route
when the user was logged-in, whether they're a member of the group or
not.

In the future the classic group page that this read() view provides is
going to be used only when the 'search_page' feature flag is off, and a
completely separate view (h.views.activity.GroupSearchController) is
going to be used when the flag is on. We'll add a view config predicate
to read() so that it's not called if the flag is on.

But we still want the join group page to be called even if the feature
flag is on, so we can't have this read() function (which is not going to
be called when the flag is on anymore) also being responsible for the
join page.

Additionally there was a separate view function, join(), which was
called when the user is logged-in but isn't a member of the group and
POSTs to the group_read route. It's a little odd that GET requests in
the "join group" scenario (group_read route, logged-in, not a member)
are handled by read() (which also handles the read group scenario)
whereas POST requests in the join group scenario are handled by a
separate join() function.

So refactor things so that:

* read() is only for the group read page that you see when you're a
  member of the group

* The new JoinController is for the join page that you see when you
  aren't a member, and has separate methods for GET and POST to this page

Note that there's still one more separate view function for this route as
well, which this commit doesn't touch: read_unauthenticated() (for when you're
not logged in).
Pull Request #4154:

626 of 1617 relevant lines covered (38.71%)

0.39 hits per line

Source Files on job 16914.3 (ACTION=frontend-lint)
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 10670
  • Travis Job 16914.3
  • 4043af29 on github
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc