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
Proposed solution to issue #404 #411
Conversation
👍 |
hi @tiagogodinho @lucasrenan I've just got commit access on this repo and plan to get back on track with maintenance over time - will be in touch soon! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tiagogodinho this looks 💯
Before merging do you mind taking care of the specs and rebasing?
@@ -8,6 +8,7 @@ | |||
builder.use Her::Middleware::FirstLevelParseJSON | |||
builder.use Faraday::Request::UrlEncoded | |||
builder.adapter :test do |stub| | |||
stub.get("/users") { |env| [200, {}, [{ :id => 1, :fullname => "Lindsay Fünke" }].to_json] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add multiple users here for consistency?
@@ -25,6 +26,14 @@ | |||
end | |||
end | |||
|
|||
context "for existing resource in a collection" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about?
context "for existing collections" do
let(:users) { Foo::User.all }
it "has no changes" do
expect(users).to_not include(be_changed)
end
end
# Initialize a resource | ||
# | ||
# @private | ||
def self.initialize_resource(klass, item_data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should come in handy elsewhere 👍
Fixed by #298. Thanks for your help on this @tiagogodinho! |
This is a proposed solution to issue #404.
The problem:
Now: