Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added method self.all for class Worklog #188

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

abataloff
Copy link

No description provided.

@bobbrodie bobbrodie added in progress Feature New features that do not exist labels Nov 13, 2016
@bobbrodie
Copy link
Member

@abataloff two things on this:

  1. Tests are failing
  2. Why remove belongs_to :issue?

@abataloff
Copy link
Author

abataloff commented Jan 30, 2017

Tests are failing
< Sorry, I do not know much Ruby, I can not understand why the fall tests. I suspect because of the remove belongs_to :issue

Why remove belongs_to :issue?
<Because initializing the object there was an error "Required option: issue messing"

Copy link
Collaborator

@SimonMiaou SimonMiaou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some tests would be nice

response = client.get(url)
json = parse_json(response.body)
json['worklogs'].map do |worklog|
client.Worklog.build(worklog)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about using new?

        json['worklogs'].map do |attrs|
          self.new(client, {:attrs => attrs})
        end

This would allow you to put back issue and probably make the tests green again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New features that do not exist
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants