Skip to content

Commit

Permalink
add comment to explain the dangling ID in the fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
singuliere committed May 4, 2022
1 parent bf728b8 commit 4b4da6b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion models/fixtures/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@
user_id: 1
op_type: 12 # close issue
act_user_id: 1
repo_id: 1700
repo_id: 1700 # dangling intentional
is_private: false
created_unix: 1603011541
2 changes: 1 addition & 1 deletion models/unittest/consistency.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func init() {

checkForActionConsistency := func(t assert.TestingT, bean interface{}) {
action := reflectionWrap(bean)
if action.int("RepoID") != 1700 {
if action.int("RepoID") != 1700 { // dangling intentional
repoRow := AssertExistsAndLoadMap(t, "repository", builder.Eq{"id": action.int("RepoID")})
assert.Equal(t, parseBool(repoRow["is_private"]), action.bool("IsPrivate"), "action: %+v", action)
}
Expand Down

0 comments on commit 4b4da6b

Please sign in to comment.