Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
bd999996
Commit
bd999996
authored
May 30, 2016
by
Robert Knight
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3381 from hypothesis/ensure-app-endpoint-relative
Make "/app" endpoints relative to serviceUrl
parents
69451ba1
3a9aea49
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
session.js
h/static/scripts/session.js
+1
-1
session-test.js
h/static/scripts/test/session-test.js
+4
-4
No files found.
h/static/scripts/session.js
View file @
bd999996
...
...
@@ -56,7 +56,7 @@ function session($http, $resource, $rootScope, flash, raven, settings) {
transformResponse
:
process
,
withCredentials
:
true
});
var
endpoint
=
new
URL
(
'
/
app/:path'
,
settings
.
serviceUrl
).
href
;
var
endpoint
=
new
URL
(
'app/:path'
,
settings
.
serviceUrl
).
href
;
var
resource
=
$resource
(
endpoint
,
{},
actions
);
// Blank initial model state
...
...
h/static/scripts/test/session-test.js
View file @
bd999996
...
...
@@ -30,7 +30,7 @@ describe('h:session', function () {
};
$provide
.
value
(
'settings'
,
{
serviceUrl
:
'https://test.hypothes.is'
,
serviceUrl
:
'https://test.hypothes.is
/root/
'
,
});
$provide
.
value
(
'flash'
,
fakeFlash
);
$provide
.
value
(
'raven'
,
fakeRaven
);
...
...
@@ -52,7 +52,7 @@ describe('h:session', function () {
// There's little point testing every single route here, as they're
// declarative and ultimately we'd be testing ngResource.
describe
(
'#login()'
,
function
()
{
var
url
=
'https://test.hypothes.is/app?__formid__=login'
;
var
url
=
'https://test.hypothes.is/
root/
app?__formid__=login'
;
it
(
'should send an HTTP POST to the action'
,
function
()
{
$httpBackend
.
expectPOST
(
url
,
{
code
:
123
}).
respond
({});
...
...
@@ -131,7 +131,7 @@ describe('h:session', function () {
});
describe
(
'#load()'
,
function
()
{
var
url
=
'https://test.hypothes.is/app'
;
var
url
=
'https://test.hypothes.is/
root/
app'
;
it
(
'should fetch the session data'
,
function
()
{
$httpBackend
.
expectGET
(
url
).
respond
({});
...
...
@@ -238,7 +238,7 @@ describe('h:session', function () {
});
describe
(
'#dismiss_sidebar_tutorial()'
,
function
()
{
var
url
=
'https://test.hypothes.is/app/dismiss_sidebar_tutorial'
;
var
url
=
'https://test.hypothes.is/
root/
app/dismiss_sidebar_tutorial'
;
it
(
'disables the tutorial for the user'
,
function
()
{
$httpBackend
.
expectPOST
(
url
).
respond
({});
session
.
dismiss_sidebar_tutorial
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment