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
dff7efd4
Commit
dff7efd4
authored
Sep 27, 2014
by
Randall Leeds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move the account controller into the auth module
parent
1ac5b1a8
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
9 deletions
+11
-9
app.coffee
h/static/scripts/app.coffee
+0
-1
account.coffee
h/static/scripts/auth/account.coffee
+7
-4
account-test.coffee
tests/js/auth/account-test.coffee
+4
-4
auth-test.coffee
tests/js/auth/auth-test.coffee
+0
-0
No files found.
h/static/scripts/app.coffee
View file @
dff7efd4
...
...
@@ -3,7 +3,6 @@ imports = [
'ngRoute'
'h.auth'
'h.controllers'
'h.controllers.AccountManagement'
'h.directives'
'h.filters'
'h.streamsearch'
...
...
h/static/scripts/
controllers/account-manageme
nt.coffee
→
h/static/scripts/
auth/accou
nt.coffee
View file @
dff7efd4
class
AccountManagement
@
inject
=
[
'$scope'
,
'$filter'
,
'flash'
,
'session'
,
'identity'
,
'formHelpers'
]
imports
=
[
'h.session'
]
class
AccountController
@
inject
=
[
'$scope'
,
'$filter'
,
'flash'
,
'session'
,
'identity'
,
'formHelpers'
]
constructor
:
(
$scope
,
$filter
,
flash
,
session
,
identity
,
formHelpers
)
->
persona_filter
=
$filter
(
'persona'
)
...
...
@@ -69,5 +72,5 @@ class AccountManagement
promise
.
$promise
.
then
(
successHandler
,
errorHandler
)
angular
.
module
(
'h.
controllers.AccountManagement'
,
[]
)
.
controller
(
'Account
Management'
,
AccountManagement
)
angular
.
module
(
'h.
account'
,
imports
)
.
controller
(
'Account
Controller'
,
AccountController
)
tests/js/
controllers/account-manageme
nt-test.coffee
→
tests/js/
auth/accou
nt-test.coffee
View file @
dff7efd4
...
...
@@ -2,7 +2,7 @@ assert = chai.assert
sinon
.
assert
.
expose
assert
,
prefix
:
null
sandbox
=
sinon
.
sandbox
.
create
()
describe
'h.
controllers.AccountManagement
'
,
->
describe
'h.
account.AccountController
'
,
->
$scope
=
null
fakeFlash
=
null
fakeSession
=
null
...
...
@@ -12,6 +12,8 @@ describe 'h.controllers.AccountManagement', ->
disableUserPromise
=
null
createController
=
null
beforeEach
module
(
'h.account'
)
beforeEach
module
(
$provide
,
$filterProvider
)
->
fakeSession
=
{}
fakeFlash
=
sandbox
.
spy
()
...
...
@@ -29,8 +31,6 @@ describe 'h.controllers.AccountManagement', ->
$provide
.
value
'formHelpers'
,
fakeFormHelpers
return
beforeEach
module
(
'h.controllers.AccountManagement'
)
beforeEach
inject
(
$rootScope
,
$q
,
$controller
)
->
$scope
=
$rootScope
.
$new
()
$scope
.
persona
=
'egon@columbia.edu'
...
...
@@ -41,7 +41,7 @@ describe 'h.controllers.AccountManagement', ->
fakeSession
.
disable_user
=
sandbox
.
stub
().
returns
(
$promise
:
disableUserPromise
)
createController
=
->
$controller
(
'Account
Management
'
,
{
$scope
:
$scope
})
$controller
(
'Account
Controller
'
,
{
$scope
:
$scope
})
describe
'.submit'
,
->
createFakeForm
=
(
overrides
=
{})
->
...
...
tests/js/auth-test.coffee
→
tests/js/auth
/auth
-test.coffee
View file @
dff7efd4
File moved
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