Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
8d49a9fd
Commit
8d49a9fd
authored
Jul 04, 2017
by
Timothy Andrew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Jasmine tests for `OAuthRememberMe`
parent
7c2f5bb4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
0 deletions
+31
-0
spec/javascripts/fixtures/oauth_remember_me.html.haml
spec/javascripts/fixtures/oauth_remember_me.html.haml
+5
-0
spec/javascripts/oauth_remember_me_spec.js
spec/javascripts/oauth_remember_me_spec.js
+26
-0
No files found.
spec/javascripts/fixtures/oauth_remember_me.html.haml
0 → 100644
View file @
8d49a9fd
#oauth-container
%input
#remember_me
{
type:
"checkbox"
}
%a
.oauth-login.twitter
{
href:
"http://example.com/"
}
%a
.oauth-login.github
{
href:
"http://example.com/"
}
spec/javascripts/oauth_remember_me_spec.js
0 → 100644
View file @
8d49a9fd
import
OAuthRememberMe
from
'
~/oauth_remember_me
'
;
describe
(
'
OAuthRememberMe
'
,
()
=>
{
preloadFixtures
(
'
static/oauth_remember_me.html.raw
'
);
beforeEach
(()
=>
{
loadFixtures
(
'
static/oauth_remember_me.html.raw
'
);
new
OAuthRememberMe
({
container
:
$
(
'
#oauth-container
'
)
}).
bindEvents
();
});
it
(
'
adds the "remember_me" query parameter to all OAuth login buttons
'
,
()
=>
{
$
(
'
#oauth-container #remember_me
'
).
click
();
expect
(
$
(
'
#oauth-container .oauth-login.twitter
'
).
attr
(
'
href
'
)).
toBe
(
'
http://example.com/?remember_me=1
'
);
expect
(
$
(
'
#oauth-container .oauth-login.github
'
).
attr
(
'
href
'
)).
toBe
(
'
http://example.com/?remember_me=1
'
);
});
it
(
'
removes the "remember_me" query parameter from all OAuth login buttons
'
,
()
=>
{
$
(
'
#oauth-container #remember_me
'
).
click
();
$
(
'
#oauth-container #remember_me
'
).
click
();
expect
(
$
(
'
#oauth-container .oauth-login.twitter
'
).
attr
(
'
href
'
)).
toBe
(
'
http://example.com/
'
);
expect
(
$
(
'
#oauth-container .oauth-login.github
'
).
attr
(
'
href
'
)).
toBe
(
'
http://example.com/
'
);
});
});
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