Unverified Commit ac6b9faf authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files
parent b007cadf
......@@ -47,30 +47,6 @@
end
describe "#after_create" do
context 'wiki_enabled creates repository directory' do
context 'wiki_enabled true creates wiki repository directory' do
before do
@project = create(:project, wiki_enabled: true)
@path = GollumWiki.new(@project, user).send(:path_to_repo)
end
after do
FileUtils.rm_rf(@path)
end
it { File.exists?(@path).should be_true }
end
context 'wiki_enabled false does not create wiki repository directory' do
before do
@project = create(:project, wiki_enabled: false)
@path = GollumWiki.new(@project, user).send(:path_to_repo)
end
it { File.exists?(@path).should be_false }
end
end
it "should send email to user" do
subject.should_receive(:notification)
Event.stub(create: true)
......
......@@ -38,6 +38,27 @@
it { @project.namespace.should == @group }
end
context 'wiki_enabled creates repository directory' do
context 'wiki_enabled true creates wiki repository directory' do
before do
@project = create_project(@user, @opts)
@path = GollumWiki.new(@project, @user).send(:path_to_repo)
end
it { File.exists?(@path).should be_true }
end
context 'wiki_enabled false does not create wiki repository directory' do
before do
@opts.merge!(wiki_enabled: false)
@project = create_project(@user, @opts)
@path = GollumWiki.new(@project, @user).send(:path_to_repo)
end
it { File.exists?(@path).should be_false }
end
end
context 'respect configured visibility setting' do
before(:each) do
@settings = double("settings")
......
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