From 7786fe7ca84503ac2f00253f7097c754c51c1062 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 10 Apr 2013 23:48:40 +0300 Subject: [PATCH] Fixing specs & spinach since Wiki model does not exists any more --- features/dashboard/search.feature | 5 ----- features/steps/dashboard/dashboard_search.rb | 11 ----------- spec/factories.rb | 6 ------ spec/services/notification_service_spec.rb | 4 ---- spec/services/project_transfer_service_spec.rb | 2 ++ 5 files changed, 2 insertions(+), 26 deletions(-) diff --git a/features/dashboard/search.feature b/features/dashboard/search.feature index 9813d9d..91d870f 100644 --- a/features/dashboard/search.feature +++ b/features/dashboard/search.feature @@ -2,13 +2,8 @@ Feature: Dashboard Search Background: Given I sign in as a user And I own project "Shop" - And Project "Shop" has wiki page "Contibuting guide" And I visit dashboard search page Scenario: I should see project I am looking for Given I search for "Sho" Then I should see "Shop" project link - - Scenario: I should see wiki page I am looking for - Given I search for "Contibuting" - Then I should see "Contibuting guide" wiki link \ No newline at end of file diff --git a/features/steps/dashboard/dashboard_search.rb b/features/steps/dashboard/dashboard_search.rb index 9c8c879..32966a8 100644 --- a/features/steps/dashboard/dashboard_search.rb +++ b/features/steps/dashboard/dashboard_search.rb @@ -16,15 +16,4 @@ class DashboardSearch < Spinach::FeatureSteps fill_in "dashboard_search", with: "Contibuting" click_button "Search" end - - And 'Project "Shop" has wiki page "Contibuting guide"' do - @wiki_page = create :wiki, - project: @project, - title: "Contibuting guide", - slug: "contributing" - end - - Then 'I should see "Contibuting guide" wiki link' do - page.should have_link "Contibuting guide" - end end diff --git a/spec/factories.rb b/spec/factories.rb index 9859fbf..8f32316 100644 --- a/spec/factories.rb +++ b/spec/factories.rb @@ -198,12 +198,6 @@ FactoryGirl.define do url end - factory :wiki do - title - content - user - end - factory :snippet do project author diff --git a/spec/services/notification_service_spec.rb b/spec/services/notification_service_spec.rb index fa47a63..21e4202 100644 --- a/spec/services/notification_service_spec.rb +++ b/spec/services/notification_service_spec.rb @@ -1,10 +1,6 @@ require 'spec_helper' describe NotificationService do - # Disable observers to prevent factory trigger notification service - before(:all) { ActiveRecord::Base.observers.disable :all } - after(:all) { ActiveRecord::Base.observers.enable :all } - let(:notification) { NotificationService.new } describe 'Keys' do diff --git a/spec/services/project_transfer_service_spec.rb b/spec/services/project_transfer_service_spec.rb index dea0b0b..7b11c97 100644 --- a/spec/services/project_transfer_service_spec.rb +++ b/spec/services/project_transfer_service_spec.rb @@ -1,6 +1,8 @@ require 'spec_helper' describe ProjectTransferService do + before(:each) { enable_observers } + context 'namespace -> namespace' do let(:user) { create(:user) } let(:group) { create(:group) } -- libgit2 0.21.2