Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
texjs-web
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Mehren
texjs-web
Commits
9d3b2e08
Verified
Commit
9d3b2e08
authored
Jun 22, 2018
by
James Allen
Committed by
David Mehren
Nov 25, 2018
Browse files
Options
Downloads
Patches
Plain Diff
Fix check for hasSubscription
parent
b2927b62
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/coffee/Features/Project/ProjectController.coffee
+1
-1
1 addition, 1 deletion
app/coffee/Features/Project/ProjectController.coffee
test/unit/coffee/Project/ProjectControllerTests.coffee
+14
-0
14 additions, 0 deletions
test/unit/coffee/Project/ProjectControllerTests.coffee
with
15 additions
and
1 deletion
app/coffee/Features/Project/ProjectController.coffee
+
1
−
1
View file @
9d3b2e08
...
@@ -214,7 +214,7 @@ module.exports = ProjectController =
...
@@ -214,7 +214,7 @@ module.exports = ProjectController =
tags
:
tags
tags
:
tags
notifications
:
notifications
or
[]
notifications
:
notifications
or
[]
user
:
user
user
:
user
hasSubscription
:
results
.
hasSubscription
[
0
]
hasSubscription
:
results
.
hasSubscription
isShowingV1Projects
:
results
.
v1Projects
?
isShowingV1Projects
:
results
.
v1Projects
?
warnings
:
warnings
warnings
:
warnings
}
}
...
...
This diff is collapsed.
Click to expand it.
test/unit/coffee/Project/ProjectControllerTests.coffee
+
14
−
0
View file @
9d3b2e08
...
@@ -305,6 +305,20 @@ describe "ProjectController", ->
...
@@ -305,6 +305,20 @@ describe "ProjectController", ->
done
()
done
()
@
ProjectController
.
projectListPage
@
req
,
@
res
@
ProjectController
.
projectListPage
@
req
,
@
res
it
'should send hasSubscription == false when no subscription'
,
(
done
)
->
@
res
.
render
=
(
pageName
,
opts
)
=>
opts
.
hasSubscription
.
should
.
equal
false
done
()
@
ProjectController
.
projectListPage
@
req
,
@
res
it
'should send hasSubscription == true when there is a subscription'
,
(
done
)
->
@
LimitationsManager
.
userHasSubscriptionOrIsGroupMember
=
sinon
.
stub
().
callsArgWith
(
1
,
null
,
true
)
@
res
.
render
=
(
pageName
,
opts
)
=>
opts
.
hasSubscription
.
should
.
equal
true
done
()
@
ProjectController
.
projectListPage
@
req
,
@
res
describe
'front widget'
,
(
done
)
->
describe
'front widget'
,
(
done
)
->
beforeEach
->
beforeEach
->
@
settings
.
overleaf
=
@
settings
.
overleaf
=
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment