Commit be98ee25 authored by Paco Guzman's avatar Paco Guzman Committed by Yorick Peterse

Fixing specs stubbed objects cannot access database

parent 136a4ea3
...@@ -52,8 +52,8 @@ describe Banzai::Pipeline::WikiPipeline do ...@@ -52,8 +52,8 @@ describe Banzai::Pipeline::WikiPipeline do
end end
describe "Links" do describe "Links" do
let(:namespace) { build_stubbed(:namespace, name: "wiki_link_ns") } let(:namespace) { create(:namespace, name: "wiki_link_ns") }
let(:project) { build_stubbed(:empty_project, :public, name: "wiki_link_project", namespace: namespace) } let(:project) { create(:empty_project, :public, name: "wiki_link_project", namespace: namespace) }
let(:project_wiki) { ProjectWiki.new(project, double(:user)) } let(:project_wiki) { ProjectWiki.new(project, double(:user)) }
let(:page) { build(:wiki_page, wiki: project_wiki, page: OpenStruct.new(url_path: 'nested/twice/start-page')) } let(:page) { build(:wiki_page, wiki: project_wiki, page: OpenStruct.new(url_path: 'nested/twice/start-page')) }
......
...@@ -194,7 +194,7 @@ describe BambooService, models: true do ...@@ -194,7 +194,7 @@ describe BambooService, models: true do
def service(bamboo_url: 'http://gitlab.com') def service(bamboo_url: 'http://gitlab.com')
described_class.create( described_class.create(
project: build_stubbed(:empty_project), project: create(:empty_project),
properties: { properties: {
bamboo_url: bamboo_url, bamboo_url: bamboo_url,
username: 'mic', username: 'mic',
......
...@@ -182,7 +182,7 @@ describe TeamcityService, models: true do ...@@ -182,7 +182,7 @@ describe TeamcityService, models: true do
def service(teamcity_url: 'http://gitlab.com') def service(teamcity_url: 'http://gitlab.com')
described_class.create( described_class.create(
project: build_stubbed(:empty_project), project: create(:empty_project),
properties: { properties: {
teamcity_url: teamcity_url, teamcity_url: teamcity_url,
username: 'mic', username: 'mic',
......
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