Commit d506a4fb authored by Brett Walker's avatar Brett Walker Committed by Eulyeon Ko

Apply review suggestions

and update graphql docs
parent f3571f65
...@@ -73,10 +73,12 @@ module Types ...@@ -73,10 +73,12 @@ module Types
field :participants, Types::UserType.connection_type, null: true, complexity: 5, field :participants, Types::UserType.connection_type, null: true, complexity: 5,
description: 'List of participants in the issue' description: 'List of participants in the issue'
field :emails_disabled, GraphQL::BOOLEAN_TYPE, method: :project_emails_disabled?, null: false, complexity: 5, field :emails_disabled, GraphQL::BOOLEAN_TYPE, null: false, complexity: 5,
method: :project_emails_disabled?,
description: 'Indicates if a project has email notifications disabled' description: 'Indicates if a project has email notifications disabled'
field :subscribe_disabled_description, GraphQL::STRING_TYPE, method: :subscribe_disabled_description, null: false, field :subscribe_disabled_description, GraphQL::STRING_TYPE, null: false,
description: 'The message to display when a project has emails notifications disabled' method: :subscribe_disabled_description,
description: 'Message to display when the project has email notifications disabled'
field :subscribed, GraphQL::BOOLEAN_TYPE, method: :subscribed?, null: false, complexity: 5, field :subscribed, GraphQL::BOOLEAN_TYPE, method: :subscribed?, null: false, complexity: 5,
description: 'Indicates the currently logged in user is subscribed to the issue' description: 'Indicates the currently logged in user is subscribed to the issue'
field :time_estimate, GraphQL::INT_TYPE, null: false, field :time_estimate, GraphQL::INT_TYPE, null: false,
......
...@@ -7526,7 +7526,7 @@ type EpicIssue implements CurrentUserTodos & Noteable { ...@@ -7526,7 +7526,7 @@ type EpicIssue implements CurrentUserTodos & Noteable {
statusPagePublishedIncident: Boolean statusPagePublishedIncident: Boolean
""" """
The message to display when a project has emails notifications disabled Message to display when the project has email notifications disabled
""" """
subscribeDisabledDescription: String! subscribeDisabledDescription: String!
...@@ -10045,7 +10045,7 @@ type Issue implements CurrentUserTodos & Noteable { ...@@ -10045,7 +10045,7 @@ type Issue implements CurrentUserTodos & Noteable {
statusPagePublishedIncident: Boolean statusPagePublishedIncident: Boolean
""" """
The message to display when a project has emails notifications disabled Message to display when the project has email notifications disabled
""" """
subscribeDisabledDescription: String! subscribeDisabledDescription: String!
......
...@@ -20748,7 +20748,7 @@ ...@@ -20748,7 +20748,7 @@
}, },
{ {
"name": "subscribeDisabledDescription", "name": "subscribeDisabledDescription",
"description": "The message to display when a project has emails notifications disabled", "description": "Message to display when the project has email notifications disabled",
"args": [ "args": [
], ],
...@@ -27395,7 +27395,7 @@ ...@@ -27395,7 +27395,7 @@
}, },
{ {
"name": "subscribeDisabledDescription", "name": "subscribeDisabledDescription",
"description": "The message to display when a project has emails notifications disabled", "description": "Message to display when the project has email notifications disabled",
"args": [ "args": [
], ],
...@@ -1234,7 +1234,7 @@ Relationship between an epic and an issue. ...@@ -1234,7 +1234,7 @@ Relationship between an epic and an issue.
| `slaDueAt` | Time | Timestamp of when the issue SLA expires. | | `slaDueAt` | Time | Timestamp of when the issue SLA expires. |
| `state` | IssueState! | State of the issue | | `state` | IssueState! | State of the issue |
| `statusPagePublishedIncident` | Boolean | Indicates whether an issue is published to the status page | | `statusPagePublishedIncident` | Boolean | Indicates whether an issue is published to the status page |
| `subscribeDisabledDescription` | String! | The message to display when a project has emails notifications disabled | | `subscribeDisabledDescription` | String! | Message to display when the project has email notifications disabled |
| `subscribed` | Boolean! | Indicates the currently logged in user is subscribed to the issue | | `subscribed` | Boolean! | Indicates the currently logged in user is subscribed to the issue |
| `taskCompletionStatus` | TaskCompletionStatus! | Task completion status of the issue | | `taskCompletionStatus` | TaskCompletionStatus! | Task completion status of the issue |
| `timeEstimate` | Int! | Time estimate of the issue | | `timeEstimate` | Int! | Time estimate of the issue |
...@@ -1500,7 +1500,7 @@ Represents a recorded measurement (object count) for the Admins. ...@@ -1500,7 +1500,7 @@ Represents a recorded measurement (object count) for the Admins.
| `slaDueAt` | Time | Timestamp of when the issue SLA expires. | | `slaDueAt` | Time | Timestamp of when the issue SLA expires. |
| `state` | IssueState! | State of the issue | | `state` | IssueState! | State of the issue |
| `statusPagePublishedIncident` | Boolean | Indicates whether an issue is published to the status page | | `statusPagePublishedIncident` | Boolean | Indicates whether an issue is published to the status page |
| `subscribeDisabledDescription` | String! | The message to display when a project has emails notifications disabled | | `subscribeDisabledDescription` | String! | Message to display when the project has email notifications disabled |
| `subscribed` | Boolean! | Indicates the currently logged in user is subscribed to the issue | | `subscribed` | Boolean! | Indicates the currently logged in user is subscribed to the issue |
| `taskCompletionStatus` | TaskCompletionStatus! | Task completion status of the issue | | `taskCompletionStatus` | TaskCompletionStatus! | Task completion status of the issue |
| `timeEstimate` | Int! | Time estimate of the issue | | `timeEstimate` | Int! | Time estimate of the issue |
......
...@@ -35,7 +35,7 @@ RSpec.describe IssuePresenter do ...@@ -35,7 +35,7 @@ RSpec.describe IssuePresenter do
end end
end end
describe '#project_emails_disabled' do describe '#project_emails_disabled?' do
subject { presenter.project_emails_disabled? } subject { presenter.project_emails_disabled? }
it 'returns false when emails notifications is enabled for project' do it 'returns false when emails notifications is enabled for project' do
...@@ -47,9 +47,7 @@ RSpec.describe IssuePresenter do ...@@ -47,9 +47,7 @@ RSpec.describe IssuePresenter do
allow(project).to receive(:emails_disabled?).and_return(true) allow(project).to receive(:emails_disabled?).and_return(true)
end end
it 'returns true' do it { is_expected.to be(true) }
is_expected.to be(true)
end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment