tracker_api 1.9.0 → 1.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby-tests.yml +34 -0
  3. data/Gemfile +2 -2
  4. data/README.md +7 -4
  5. data/lib/tracker_api.rb +13 -1
  6. data/lib/tracker_api/client.rb +2 -2
  7. data/lib/tracker_api/endpoints/attachment.rb +3 -1
  8. data/lib/tracker_api/endpoints/blockers.rb +20 -0
  9. data/lib/tracker_api/endpoints/comment.rb +15 -5
  10. data/lib/tracker_api/endpoints/comments.rb +10 -5
  11. data/lib/tracker_api/endpoints/iteration.rb +35 -0
  12. data/lib/tracker_api/endpoints/release.rb +17 -0
  13. data/lib/tracker_api/endpoints/releases.rb +20 -0
  14. data/lib/tracker_api/endpoints/review.rb +21 -0
  15. data/lib/tracker_api/endpoints/reviews.rb +21 -0
  16. data/lib/tracker_api/endpoints/search.rb +1 -1
  17. data/lib/tracker_api/endpoints/stories.rb +10 -0
  18. data/lib/tracker_api/error.rb +12 -2
  19. data/lib/tracker_api/file_utility.rb +1 -1
  20. data/lib/tracker_api/resources/blocker.rb +18 -0
  21. data/lib/tracker_api/resources/comment.rb +2 -2
  22. data/lib/tracker_api/resources/cycle_time_details.rb +21 -0
  23. data/lib/tracker_api/resources/daily_history_container.rb +13 -0
  24. data/lib/tracker_api/resources/epic.rb +10 -1
  25. data/lib/tracker_api/resources/iteration.rb +14 -0
  26. data/lib/tracker_api/resources/project.rb +13 -0
  27. data/lib/tracker_api/resources/release.rb +29 -0
  28. data/lib/tracker_api/resources/review.rb +35 -0
  29. data/lib/tracker_api/resources/review_type.rb +15 -0
  30. data/lib/tracker_api/resources/story.rb +29 -3
  31. data/lib/tracker_api/version.rb +1 -1
  32. data/test/client_test.rb +52 -52
  33. data/test/comment_test.rb +101 -32
  34. data/test/error_test.rb +8 -2
  35. data/test/file_attachment_test.rb +2 -2
  36. data/test/iteration_test.rb +31 -0
  37. data/test/minitest_helper.rb +7 -4
  38. data/test/project_test.rb +59 -47
  39. data/test/release_test.rb +22 -0
  40. data/test/review_test.rb +27 -0
  41. data/test/story_test.rb +65 -48
  42. data/test/task_test.rb +3 -3
  43. data/test/vcr/cassettes/create_epic_attachments.json +1 -0
  44. data/test/vcr/cassettes/create_epic_comment.json +1 -0
  45. data/test/vcr/cassettes/create_epic_comment_with_attachment.json +1 -0
  46. data/test/vcr/cassettes/create_story_attachments.json +1 -0
  47. data/test/vcr/cassettes/create_story_comment.json +1 -1
  48. data/test/vcr/cassettes/create_story_comment_with_attachment.json +1 -0
  49. data/test/vcr/cassettes/delete_epic_attachments.json +1 -0
  50. data/test/vcr/cassettes/delete_epic_comment.json +1 -0
  51. data/test/vcr/cassettes/delete_story_attachments.json +1 -0
  52. data/test/vcr/cassettes/delete_story_comment.json +1 -0
  53. data/test/vcr/cassettes/get_current_iteration.json +1 -1
  54. data/test/vcr/cassettes/get_cycle_time_details.json +1 -0
  55. data/test/vcr/cassettes/get_daily_history_container.json +1 -0
  56. data/test/vcr/cassettes/get_epic.json +1 -0
  57. data/test/vcr/cassettes/get_epic_comments.json +1 -0
  58. data/test/vcr/cassettes/get_releases.json +1 -0
  59. data/test/vcr/cassettes/get_story_reviews.json +1 -0
  60. data/test/vcr/cassettes/release_stories.json +1 -0
  61. data/test/vcr/cassettes/save_epic_comment.json +1 -0
  62. data/test/vcr/cassettes/save_review.json +1 -0
  63. data/test/vcr/cassettes/save_story_comment.json +1 -0
  64. data/test/vcr/cassettes/search_project.json +1 -1
  65. data/test/workspace_test.rb +5 -5
  66. data/tracker_api.gemspec +2 -2
  67. metadata +63 -8
  68. data/.travis.yml +0 -13
@@ -32,13 +32,13 @@ module TrackerApi
32
32
  end
33
33
 
34
34
  def save
35
- raise ArgumentError, 'Cannot update a comment with an unknown story_id.' if story_id.nil?
35
+ raise ArgumentError, 'Cannot update a comment with an unknown story_id or epic_id.' if story_id.nil? && epic_id.nil?
36
36
 
37
37
  Endpoints::Comment.new(client).update(self, UpdateRepresenter.new(Comment.new(self.dirty_attributes)))
38
38
  end
39
39
 
40
40
  def delete
41
- raise ArgumentError, 'Cannot delete a comment with an unknown story_id.' if story_id.nil?
41
+ raise ArgumentError, 'Cannot delete a comment with an unknown story_id or epic_id.' if story_id.nil? && epic_id.nil?
42
42
 
43
43
  Endpoints::Comment.new(client).delete(self)
44
44
  end
@@ -0,0 +1,21 @@
1
+ module TrackerApi
2
+ module Resources
3
+ class CycleTimeDetails
4
+ include Shared::Base
5
+
6
+ attribute :project_id, Integer
7
+ attribute :iteration_number, Integer
8
+ attribute :total_cycle_time, Integer
9
+ attribute :started_time, Integer
10
+ attribute :started_count, Integer
11
+ attribute :finished_time, Integer
12
+ attribute :finished_count, Integer
13
+ attribute :delivered_time, Integer
14
+ attribute :delivered_count, Integer
15
+ attribute :rejected_time, Integer
16
+ attribute :rejected_count, Integer
17
+ attribute :story_id, Integer
18
+ attribute :kind, String
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,13 @@
1
+ module TrackerApi
2
+ module Resources
3
+ class DailyHistoryContainer
4
+ include Shared::Base
5
+
6
+ attribute :project_id, Integer
7
+ attribute :iteration_number, Integer
8
+ attribute :header, [String]
9
+ attribute :data, [Enumerable]
10
+ attribute :kind, String
11
+ end
12
+ end
13
+ end
@@ -35,11 +35,20 @@ module TrackerApi
35
35
  Endpoints::Epic.new(client).update(self, UpdateRepresenter.new(self))
36
36
  end
37
37
 
38
+ # Provides a list of all the comments on the epic.
39
+ def comments(reload: false)
40
+ if !reload && @comments.present?
41
+ @comments
42
+ else
43
+ @comments = Endpoints::Comments.new(client).get(project_id, epic_id: id)
44
+ end
45
+ end
46
+
38
47
  # @param [Hash] params attributes to create the comment with
39
48
  # @return [Comment] newly created Comment
40
49
  def create_comment(params)
41
50
  files = params.delete(:files)
42
- comment = Endpoints::Comment.new(client).create(project_id, id, params)
51
+ comment = Endpoints::Comment.new(client).create(project_id, epic_id: id, params: params)
43
52
  comment.create_attachments(files: files) if files.present?
44
53
  comment
45
54
  end
@@ -24,6 +24,20 @@ module TrackerApi
24
24
  def stories=(data)
25
25
  super.each { |s| s.client = client }
26
26
  end
27
+
28
+ # Provides a list of all the cycle_time_details of each story in the iteration.
29
+ #
30
+ # @return [Array[CycleTimeDetails]] array of cycle_time_details of iterations in this project
31
+ def cycle_time_details
32
+ Endpoints::Iteration.new(client).get_analytics_cycle_time_details(project_id, number)
33
+ end
34
+
35
+ # Returns per day information of story points and counts by state for the given iteration.
36
+ #
37
+ # @return [DailyHistoryContainer]
38
+ def get_history
39
+ Endpoints::Iteration.new(client).get_history(project_id, number)
40
+ end
27
41
  end
28
42
  end
29
43
  end
@@ -131,6 +131,19 @@ module TrackerApi
131
131
  Endpoints::Stories.new(client).get(id, params)
132
132
  end
133
133
 
134
+ # Provides a list of all the releases in the project.
135
+ #
136
+ # @param [Hash] params
137
+ # @option params [String] :with_state A release's current_state which all returned releases must match.
138
+ # Valid enumeration values: accepted, delivered, finished, started, rejected, unstarted, unscheduled
139
+ # @option params [Integer] :offset With the first release in your priority list as 0,
140
+ # the index of the first release you want returned.
141
+ # @option params [Integer] :limit The number of releases you want returned.
142
+ # @return [Array[Release]] releases associated with this project
143
+ def releases(params={})
144
+ Endpoints::Releases.new(client).get(id, params)
145
+ end
146
+
134
147
  # Provides a list of all the memberships in the project.
135
148
  #
136
149
  # @param [Hash] params
@@ -0,0 +1,29 @@
1
+ module TrackerApi
2
+ module Resources
3
+ class Release
4
+ include Shared::Base
5
+
6
+ attribute :client
7
+
8
+ attribute :project_id, Integer
9
+ attribute :name, String
10
+ attribute :description, String
11
+ attribute :current_state, String # (accepted, delivered, finished, started, rejected, planned, unstarted, unscheduled)
12
+ attribute :accepted_at, DateTime
13
+ attribute :deadline, DateTime
14
+ attribute :labels, [Label]
15
+ attribute :created_at, DateTime
16
+ attribute :updated_at, DateTime
17
+ attribute :url, String
18
+ attribute :kind, String
19
+
20
+ # Provides a list of all the stories in the release.
21
+ #
22
+ # @param [Hash] params
23
+ # @return [Array[Story]] stories of this release
24
+ def stories(params={})
25
+ Endpoints::Stories.new(client).get_release(project_id, id, params)
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,35 @@
1
+ module TrackerApi
2
+ module Resources
3
+ class Review
4
+ include Shared::Base
5
+
6
+ attribute :client
7
+
8
+ attribute :id, Integer
9
+ attribute :story_id, Integer
10
+ attribute :project_id, Integer
11
+ attribute :review_type_id, Integer
12
+ attribute :reviewer_id, Integer
13
+ attribute :status, String # (unstarted, in_review, pass, revise)
14
+ attribute :created_at, DateTime
15
+ attribute :updated_at, DateTime
16
+ attribute :kind, String
17
+ attribute :review_type, ReviewType
18
+
19
+ class UpdateRepresenter < Representable::Decorator
20
+ include Representable::JSON
21
+
22
+ property :id
23
+ property :review_type_id
24
+ property :reviewer_id
25
+ property :status
26
+ end
27
+
28
+ def save
29
+ raise ArgumentError, 'Cannot update a review with an unknown story_id.' if story_id.nil?
30
+
31
+ Endpoints::Review.new(client).update(self, UpdateRepresenter.new(Review.new(dirty_attributes)))
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,15 @@
1
+ module TrackerApi
2
+ module Resources
3
+ class ReviewType
4
+ include Shared::Base
5
+
6
+ attribute :id, Integer
7
+ attribute :project_id, Integer
8
+ attribute :name, String
9
+ attribute :hidden, Boolean
10
+ attribute :created_at, DateTime
11
+ attribute :updated_at, DateTime
12
+ attribute :kind, String
13
+ end
14
+ end
15
+ end
@@ -8,6 +8,7 @@ module TrackerApi
8
8
  attribute :accepted_at, DateTime
9
9
  attribute :after_id, Integer
10
10
  attribute :before_id, Integer
11
+ attribute :blockers, [Blocker]
11
12
  attribute :comment_ids, [Integer]
12
13
  attribute :comments, [Comment]
13
14
  attribute :created_at, DateTime
@@ -31,6 +32,7 @@ module TrackerApi
31
32
  attribute :project_id, Integer
32
33
  attribute :requested_by, Person
33
34
  attribute :requested_by_id, Integer
35
+ attribute :reviews, [Review]
34
36
  attribute :story_type, String # (feature, bug, chore, release)
35
37
  attribute :task_ids, [Integer]
36
38
  attribute :tasks, [Task]
@@ -54,6 +56,7 @@ module TrackerApi
54
56
  property :deadline
55
57
  property :requested_by_id
56
58
  property :owner_ids, if: ->(_) { !owner_ids.blank? }
59
+ property :project_id
57
60
 
58
61
  # Use render_empty: false to address: https://github.com/dashofcode/tracker_api/issues/110
59
62
  # - The default value of the labels attribute in Resources::Story is an empty array.
@@ -98,7 +101,7 @@ module TrackerApi
98
101
  #
99
102
  # @param [Person|Fixnum] owner
100
103
  def add_owner(owner)
101
- owner_id = if owner.kind_of?(Fixnum)
104
+ owner_id = if owner.kind_of?(Integer)
102
105
  owner_id = owner
103
106
  else
104
107
  raise ArgumentError, 'Valid Person expected.' unless owner.instance_of?(Resources::Person)
@@ -117,6 +120,10 @@ module TrackerApi
117
120
  Endpoints::Activity.new(client).get_story(project_id, id, params)
118
121
  end
119
122
 
123
+ def blockers(params = {})
124
+ Endpoints::Blockers.new(client).get(project_id, id, params)
125
+ end
126
+
120
127
  # Provides a list of all the comments on the story.
121
128
  #
122
129
  # @param [Hash] params
@@ -125,7 +132,7 @@ module TrackerApi
125
132
  if !reload && @comments.present?
126
133
  @comments
127
134
  else
128
- @comments = Endpoints::Comments.new(client).get(project_id, id)
135
+ @comments = Endpoints::Comments.new(client).get(project_id, story_id: id)
129
136
  end
130
137
  end
131
138
 
@@ -165,6 +172,17 @@ module TrackerApi
165
172
  end
166
173
  end
167
174
 
175
+ # Returns the story's original ("undirtied") project_id
176
+ #
177
+ # @return Integer
178
+ def project_id
179
+ if dirty_attributes.key?(:project_id)
180
+ original_attributes[:project_id]
181
+ else
182
+ @project_id
183
+ end
184
+ end
185
+
168
186
  # @param [Hash] params attributes to create the task with
169
187
  # @return [Task] newly created Task
170
188
  def create_task(params)
@@ -175,7 +193,7 @@ module TrackerApi
175
193
  # @return [Comment] newly created Comment
176
194
  def create_comment(params)
177
195
  files = params.delete(:files)
178
- comment = Endpoints::Comment.new(client).create(project_id, id, params)
196
+ comment = Endpoints::Comment.new(client).create(project_id, story_id: id, params: params)
179
197
  comment.create_attachments(files: files) if files.present?
180
198
  comment
181
199
  end
@@ -187,6 +205,14 @@ module TrackerApi
187
205
 
188
206
  Endpoints::Story.new(client).update(self, UpdateRepresenter.new(Story.new(self.dirty_attributes)))
189
207
  end
208
+
209
+ def reviews(params = {})
210
+ if params.blank? && @reviews.present?
211
+ @reviews
212
+ else
213
+ @reviews = Endpoints::Reviews.new(client).get(project_id, id, params)
214
+ end
215
+ end
190
216
  end
191
217
  end
192
218
  end
@@ -1,3 +1,3 @@
1
1
  module TrackerApi
2
- VERSION = '1.9.0'
2
+ VERSION = '1.13.0'
3
3
  end
data/test/client_test.rb CHANGED
@@ -2,7 +2,7 @@ require_relative 'minitest_helper'
2
2
 
3
3
  describe TrackerApi do
4
4
  it 'has a version' do
5
- ::TrackerApi::VERSION.wont_be_nil
5
+ _(::TrackerApi::VERSION).wont_be_nil
6
6
  end
7
7
  end
8
8
 
@@ -13,10 +13,10 @@ describe TrackerApi::Client do
13
13
  token: '12345',
14
14
  logger: LOGGER)
15
15
 
16
- client.url.must_equal 'http://test.com'
17
- client.api_version.must_equal '/foo-bar/1'
18
- client.token.must_equal '12345'
19
- client.logger.must_equal LOGGER
16
+ _(client.url).must_equal 'http://test.com'
17
+ _(client.api_version).must_equal '/foo-bar/1'
18
+ _(client.token).must_equal '12345'
19
+ _(client.logger).must_equal LOGGER
20
20
  end
21
21
 
22
22
  describe '.projects' do
@@ -27,18 +27,18 @@ describe TrackerApi::Client do
27
27
  VCR.use_cassette('get all projects', record: :new_episodes) do
28
28
  projects = client.projects(fields: ':default,account,current_velocity,labels(name),epics(:default,label(name))')
29
29
 
30
- projects.wont_be_empty
30
+ _(projects).wont_be_empty
31
31
  project = projects.first
32
- project.must_be_instance_of TrackerApi::Resources::Project
33
- project.id.must_equal pt_user[:project_id]
32
+ _(project).must_be_instance_of TrackerApi::Resources::Project
33
+ _(project.id).must_equal pt_user[:project_id]
34
34
 
35
- project.account.must_be_instance_of TrackerApi::Resources::Account
35
+ _(project.account).must_be_instance_of TrackerApi::Resources::Account
36
36
 
37
- project.labels.wont_be_empty
38
- project.labels.first.must_be_instance_of TrackerApi::Resources::Label
37
+ _(project.labels).wont_be_empty
38
+ _(project.labels.first).must_be_instance_of TrackerApi::Resources::Label
39
39
 
40
- project.epics.wont_be_empty
41
- project.epics.first.must_be_instance_of TrackerApi::Resources::Epic
40
+ _(project.epics).wont_be_empty
41
+ _(project.epics.first).must_be_instance_of TrackerApi::Resources::Epic
42
42
  end
43
43
  end
44
44
  end
@@ -52,11 +52,11 @@ describe TrackerApi::Client do
52
52
  VCR.use_cassette('get project', record: :new_episodes) do
53
53
  project = client.project(project_id)
54
54
 
55
- project.must_be_instance_of TrackerApi::Resources::Project
56
- project.id.must_equal project_id
55
+ _(project).must_be_instance_of TrackerApi::Resources::Project
56
+ _(project.id).must_equal project_id
57
57
 
58
- project.account.must_be_nil
59
- project.account_id.wont_be_nil
58
+ _(project.account).must_be_nil
59
+ _(project.account_id).wont_be_nil
60
60
  end
61
61
  end
62
62
  end
@@ -69,9 +69,9 @@ describe TrackerApi::Client do
69
69
  VCR.use_cassette('get workspace', record: :new_episodes) do
70
70
  workspace = client.workspace(pt_user[:workspace_id])
71
71
 
72
- workspace.must_be_instance_of TrackerApi::Resources::Workspace
73
- workspace.id.must_equal pt_user[:workspace_id]
74
- workspace.name.wont_be_empty
72
+ _(workspace).must_be_instance_of TrackerApi::Resources::Workspace
73
+ _(workspace.id).must_equal pt_user[:workspace_id]
74
+ _(workspace.name).wont_be_empty
75
75
  end
76
76
  end
77
77
  end
@@ -85,10 +85,10 @@ describe TrackerApi::Client do
85
85
  VCR.use_cassette('get all workspaces', record: :new_episodes) do
86
86
  workspaces = client.workspaces(fields: ':default,projects(id,name)')
87
87
 
88
- workspaces.wont_be_empty
88
+ _(workspaces).wont_be_empty
89
89
  workspace = workspaces.first
90
- workspace.must_be_instance_of TrackerApi::Resources::Workspace
91
- workspace.id.must_equal pt_user[:workspace_id]
90
+ _(workspace).must_be_instance_of TrackerApi::Resources::Workspace
91
+ _(workspace.id).must_equal pt_user[:workspace_id]
92
92
  end
93
93
  end
94
94
  end
@@ -105,10 +105,10 @@ describe TrackerApi::Client do
105
105
  VCR.use_cassette('get me', record: :new_episodes) do
106
106
  me = client.me
107
107
 
108
- me.must_be_instance_of TrackerApi::Resources::Me
109
- me.username.must_equal username
108
+ _(me).must_be_instance_of TrackerApi::Resources::Me
109
+ _(me.username).must_equal username
110
110
 
111
- me.projects.map(&:project_id).must_include project_id
111
+ _(me.projects.map(&:project_id)).must_include project_id
112
112
  end
113
113
  end
114
114
  end
@@ -124,14 +124,14 @@ describe TrackerApi::Client do
124
124
 
125
125
  # skip pagination with a hugh limit
126
126
  unpaged_stories = project.stories(limit: 300)
127
- unpaged_stories.wont_be_empty
128
- unpaged_stories.length.must_be :>, 7
127
+ _(unpaged_stories).wont_be_empty
128
+ _(unpaged_stories.length).must_be :>, 7
129
129
 
130
130
  # force pagination with a small limit
131
131
  paged_stories = project.stories(limit: 7)
132
- paged_stories.wont_be_empty
133
- paged_stories.length.must_equal unpaged_stories.length
134
- paged_stories.map(&:id).sort.uniq.must_equal unpaged_stories.map(&:id).sort.uniq
132
+ _(paged_stories).wont_be_empty
133
+ _(paged_stories.length).must_equal unpaged_stories.length
134
+ _(paged_stories.map(&:id).sort.uniq).must_equal unpaged_stories.map(&:id).sort.uniq
135
135
  end
136
136
  end
137
137
 
@@ -141,8 +141,8 @@ describe TrackerApi::Client do
141
141
 
142
142
  # force no pagination
143
143
  stories = project.stories(limit: 7, auto_paginate: false)
144
- stories.wont_be_empty
145
- stories.length.must_equal 7
144
+ _(stories).wont_be_empty
145
+ _(stories.length).must_equal 7
146
146
  end
147
147
  end
148
148
 
@@ -152,8 +152,8 @@ describe TrackerApi::Client do
152
152
 
153
153
  done_iterations = project.iterations(scope: :done, offset: -12, limit: 5)
154
154
 
155
- done_iterations.wont_be_empty
156
- done_iterations.length.must_be :<=, 12
155
+ _(done_iterations).wont_be_empty
156
+ _(done_iterations.length).must_be :<=, 12
157
157
  end
158
158
  end
159
159
  end
@@ -166,8 +166,8 @@ describe TrackerApi::Client do
166
166
  VCR.use_cassette('client: get single story by story id', record: :new_episodes) do
167
167
  story = client.story('66728004', fields: ':default,owned_by')
168
168
 
169
- story.must_be_instance_of TrackerApi::Resources::Story
170
- story.owned_by.wont_be_nil
169
+ _(story).must_be_instance_of TrackerApi::Resources::Story
170
+ _(story.owned_by).wont_be_nil
171
171
  end
172
172
  end
173
173
  end
@@ -180,8 +180,8 @@ describe TrackerApi::Client do
180
180
  VCR.use_cassette('client: get single epic by epic id', record: :new_episodes) do
181
181
  epic = client.epic('1087314', fields: ':default,label_id')
182
182
 
183
- epic.must_be_instance_of TrackerApi::Resources::Epic
184
- epic.label_id.wont_be_nil
183
+ _(epic).must_be_instance_of TrackerApi::Resources::Epic
184
+ _(epic.label_id).wont_be_nil
185
185
  end
186
186
  end
187
187
  end
@@ -194,13 +194,13 @@ describe TrackerApi::Client do
194
194
  VCR.use_cassette('get all notifications', record: :new_episodes) do
195
195
  notifications = client.notifications
196
196
 
197
- notifications.wont_be_empty
197
+ _(notifications).wont_be_empty
198
198
  notification = notifications.first
199
- notification.must_be_instance_of TrackerApi::Resources::Notification
199
+ _(notification).must_be_instance_of TrackerApi::Resources::Notification
200
200
 
201
- notification.project.id.must_equal pt_user[:project_id]
202
- notification.story.must_be_instance_of TrackerApi::Resources::Story
203
- notification.performer.must_be_instance_of TrackerApi::Resources::Person
201
+ _(notification.project.id).must_equal pt_user[:project_id]
202
+ _(notification.story).must_be_instance_of TrackerApi::Resources::Story
203
+ _(notification.performer).must_be_instance_of TrackerApi::Resources::Person
204
204
  end
205
205
  end
206
206
  end
@@ -213,19 +213,19 @@ describe TrackerApi::Client do
213
213
  VCR.use_cassette('get my activities', record: :new_episodes) do
214
214
  activities = client.activity(fields: ':default')
215
215
 
216
- activities.wont_be_empty
216
+ _(activities).wont_be_empty
217
217
  activity = activities.first
218
- activity.must_be_instance_of TrackerApi::Resources::Activity
218
+ _(activity).must_be_instance_of TrackerApi::Resources::Activity
219
219
 
220
- activity.changes.wont_be_empty
221
- activity.changes.first.must_be_instance_of TrackerApi::Resources::Change
220
+ _(activity.changes).wont_be_empty
221
+ _(activity.changes.first).must_be_instance_of TrackerApi::Resources::Change
222
222
 
223
- activity.primary_resources.wont_be_empty
224
- activity.primary_resources.first.must_be_instance_of TrackerApi::Resources::PrimaryResource
223
+ _(activity.primary_resources).wont_be_empty
224
+ _(activity.primary_resources.first).must_be_instance_of TrackerApi::Resources::PrimaryResource
225
225
 
226
- activity.project.must_be_instance_of TrackerApi::Resources::Project
226
+ _(activity.project).must_be_instance_of TrackerApi::Resources::Project
227
227
 
228
- activity.performed_by.must_be_instance_of TrackerApi::Resources::Person
228
+ _(activity.performed_by).must_be_instance_of TrackerApi::Resources::Person
229
229
  end
230
230
  end
231
231
  end