Fix spec for project create service

parent ce8877f3
......@@ -125,15 +125,14 @@ describe Projects::CreateService, '#execute', services: true do
end
end
context "git hook sample" do
before do
@push_rule_sample = create :push_rule_sample
end
context 'git hook sample' do
it 'creates git hook from sample' do
push_rule_sample = create(:push_rule_sample)
push_rule = create_project(user, opts).push_rule
it "creates git hook from sample" do
push_rule = create_project(@user, @opts).push_rule
[:force_push_regex, :deny_delete_tag, :delete_branch_regex, :commit_message_regex].each do |attr_name|
expect(push_rule.send(attr_name)).to eq @push_rule_sample.send(attr_name)
expect(push_rule.send(attr_name)).to eq push_rule_sample.send(attr_name)
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment