Skip to content

Commit

Permalink
Merge pull request #3998 from bgeuken/fix_flaky_test
Browse files Browse the repository at this point in the history
[ci] Fix flaky test
  • Loading branch information
bgeuken committed Oct 12, 2017
2 parents 8817c9c + f2e75f8 commit a50b4ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/spec/models/project_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@
end

describe '#add_maintainer' do
subject { project }
subject { create(:user).home_project }

it_behaves_like "makes a user a maintainer of the subject"
end
Expand Down
3 changes: 3 additions & 0 deletions src/api/spec/support/shared_examples/relationships.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
let(:maintainer_role) { Role.where(title: 'maintainer')}

before do
object = (subject.kind_of?(Project) ? subject : subject.project)
login(object.relationships.maintainers.first.user)

subject.add_maintainer(other_user)
end

Expand Down

0 comments on commit a50b4ed

Please sign in to comment.