Cuke for web+diaspora:// link handler

closes #7826
This commit is contained in:
cmrd Senya 2018-06-26 23:09:20 +03:00 committed by Benjamin Neff
parent 80dfdcd6af
commit a7cc0645e0
No known key found for this signature in database
GPG key ID: 971464C3F1A90194
3 changed files with 23 additions and 0 deletions

View file

@ -6,6 +6,7 @@
* Add compatibility with macOS to `script/configure_bundler` [#7830](https://github.com/diaspora/diaspora/pull/7830)
## Features
* Add `web+diaspora://` link handler [#7826](https://github.com/diaspora/diaspora/pull/7826)
# 0.7.6.0

View file

@ -0,0 +1,15 @@
@javascript
Feature: (web+)diaspora:// links resolve
In order to open diaspora posts on my pod from external websites
As a user
I want external links to be resolved to local pod paths
Background:
Given following user exists:
| username | email |
| Alice | alice@alice.alice |
And "alice@alice.alice" has a public post with text "This is a post accessed by an external link"
Scenario: Resolving web+diaspora:// link
When I open an external link to the first post of "alice@alice.alice"
Then I should see "This is a post accessed by an external link"

View file

@ -0,0 +1,7 @@
# frozen_string_literal: true
When /^I open an external link to the first post of "([^"]*)"$/ do |email|
user = User.find_by(email: email)
post = user.posts.first
visit(link_path(q: "web+diaspora://#{user.diaspora_handle}/post/#{post.guid}"))
end