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

Commit

Permalink
Change incremental ID so that it starts with 1
Browse files Browse the repository at this point in the history
  • Loading branch information
r7kamura committed Jul 24, 2013
1 parent 345f711 commit 849901a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/models/build.rb
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 + 1)
end

private
Expand Down
4 changes: 2 additions & 2 deletions spec/models/build_spec.rb
Expand Up @@ -16,7 +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
build.incremental_id.should == 1
end
end

Expand All @@ -30,7 +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
build.incremental_id.should == 1
end
end
end
Expand Down

0 comments on commit 849901a

Please sign in to comment.