Skip to content
This repository has been archived by the owner on Dec 4, 2019. It is now read-only.

Commit

Permalink
Fix a bug of updating Build#incremental_id
Browse files Browse the repository at this point in the history
  • Loading branch information
makimoto committed Jul 24, 2013
1 parent 00d7add commit c6e4aac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/build.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def finish(result)
end

def update_incremental_id
update_attributes(incremental_id: job.builds_count)
update_attributes(incremental_id: job.builds.count)
end

private
Expand Down
2 changes: 2 additions & 0 deletions spec/models/build_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
build.started_at.should be_present
build.finished_at.should be_present
build.status.should == true
build.incremental_id.should_not be_nil
end
end

Expand All @@ -29,6 +30,7 @@
build.started_at.should be_present
build.finished_at.should be_present
build.status.should == false
build.incremental_id.should_not be_nil
end
end
end
Expand Down

0 comments on commit c6e4aac

Please sign in to comment.