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
Hide 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 = [
...
@@ -3,7 +3,6 @@ imports = [
'ngRoute'
'ngRoute'
'h.auth'
'h.auth'
'h.controllers'
'h.controllers'
'h.controllers.AccountManagement'
'h.directives'
'h.directives'
'h.filters'
'h.filters'
'h.streamsearch'
'h.streamsearch'
...
...
h/static/scripts/
controllers/account-manageme
nt.coffee
→
h/static/scripts/
auth/accou
nt.coffee
View file @
dff7efd4
class
AccountManagement
imports
=
[
@
inject
=
[
'$scope'
,
'$filter'
,
'flash'
,
'session'
,
'identity'
,
'formHelpers'
]
'h.session'
]
class
AccountController
@
inject
=
[
'$scope'
,
'$filter'
,
'flash'
,
'session'
,
'identity'
,
'formHelpers'
]
constructor
:
(
$scope
,
$filter
,
flash
,
session
,
identity
,
formHelpers
)
->
constructor
:
(
$scope
,
$filter
,
flash
,
session
,
identity
,
formHelpers
)
->
persona_filter
=
$filter
(
'persona'
)
persona_filter
=
$filter
(
'persona'
)
...
@@ -69,5 +72,5 @@ class AccountManagement
...
@@ -69,5 +72,5 @@ class AccountManagement
promise
.
$promise
.
then
(
successHandler
,
errorHandler
)
promise
.
$promise
.
then
(
successHandler
,
errorHandler
)
angular
.
module
(
'h.
controllers.AccountManagement'
,
[]
)
angular
.
module
(
'h.
account'
,
imports
)
.
controller
(
'Account
Management'
,
AccountManagement
)
.
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
...
@@ -2,7 +2,7 @@ assert = chai.assert
sinon
.
assert
.
expose
assert
,
prefix
:
null
sinon
.
assert
.
expose
assert
,
prefix
:
null
sandbox
=
sinon
.
sandbox
.
create
()
sandbox
=
sinon
.
sandbox
.
create
()
describe
'h.
controllers.AccountManagement
'
,
->
describe
'h.
account.AccountController
'
,
->
$scope
=
null
$scope
=
null
fakeFlash
=
null
fakeFlash
=
null
fakeSession
=
null
fakeSession
=
null
...
@@ -12,6 +12,8 @@ describe 'h.controllers.AccountManagement', ->
...
@@ -12,6 +12,8 @@ describe 'h.controllers.AccountManagement', ->
disableUserPromise
=
null
disableUserPromise
=
null
createController
=
null
createController
=
null
beforeEach
module
(
'h.account'
)
beforeEach
module
(
$provide
,
$filterProvider
)
->
beforeEach
module
(
$provide
,
$filterProvider
)
->
fakeSession
=
{}
fakeSession
=
{}
fakeFlash
=
sandbox
.
spy
()
fakeFlash
=
sandbox
.
spy
()
...
@@ -29,8 +31,6 @@ describe 'h.controllers.AccountManagement', ->
...
@@ -29,8 +31,6 @@ describe 'h.controllers.AccountManagement', ->
$provide
.
value
'formHelpers'
,
fakeFormHelpers
$provide
.
value
'formHelpers'
,
fakeFormHelpers
return
return
beforeEach
module
(
'h.controllers.AccountManagement'
)
beforeEach
inject
(
$rootScope
,
$q
,
$controller
)
->
beforeEach
inject
(
$rootScope
,
$q
,
$controller
)
->
$scope
=
$rootScope
.
$new
()
$scope
=
$rootScope
.
$new
()
$scope
.
persona
=
'egon@columbia.edu'
$scope
.
persona
=
'egon@columbia.edu'
...
@@ -41,7 +41,7 @@ describe 'h.controllers.AccountManagement', ->
...
@@ -41,7 +41,7 @@ describe 'h.controllers.AccountManagement', ->
fakeSession
.
disable_user
=
sandbox
.
stub
().
returns
(
$promise
:
disableUserPromise
)
fakeSession
.
disable_user
=
sandbox
.
stub
().
returns
(
$promise
:
disableUserPromise
)
createController
=
->
createController
=
->
$controller
(
'Account
Management
'
,
{
$scope
:
$scope
})
$controller
(
'Account
Controller
'
,
{
$scope
:
$scope
})
describe
'.submit'
,
->
describe
'.submit'
,
->
createFakeForm
=
(
overrides
=
{})
->
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