Upgraded to Rails 4
This commit is contained in:
@@ -6,12 +6,12 @@ describe FetprofilesController, :type => :controller do
|
||||
|
||||
def self.create_fetprofile
|
||||
before(:each) do
|
||||
@fetprofile = FactoryGirl.create(:fetprofile)
|
||||
@fetprofile = FactoryBot.create(:fetprofile)
|
||||
end
|
||||
end
|
||||
def self.create_active_fetprofile
|
||||
before(:each) do
|
||||
@fetprofile = FactoryGirl.create(:fetprofile, active: true)
|
||||
@fetprofile = FactoryBot.create(:fetprofile, active: true)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -81,7 +81,7 @@ describe FetprofilesController, :type => :controller do
|
||||
end
|
||||
|
||||
describe "POST create" do
|
||||
subject(:action){post :create, {:fetprofile => FactoryGirl.attributes_for(:fetprofile),:format=>:html}}
|
||||
subject(:action){post :create, {:fetprofile => FactoryBot.attributes_for(:fetprofile),:format=>:html}}
|
||||
|
||||
login_fet_user
|
||||
describe "with valid params" do
|
||||
|
||||
@@ -6,12 +6,12 @@ describe GremienController, :type => :controller do
|
||||
|
||||
def self.create_gremium
|
||||
before(:each) do
|
||||
@gremium = FactoryGirl.create(:gremium)
|
||||
@gremium = FactoryBot.create(:gremium)
|
||||
end
|
||||
end
|
||||
# def self.create_active_gremium
|
||||
# before(:each) do
|
||||
# @gremium = FactoryGirl.create(:gremium, active: true)
|
||||
# @gremium = FactoryBot.create(:gremium, active: true)
|
||||
# end
|
||||
# end
|
||||
|
||||
@@ -81,7 +81,7 @@ describe GremienController, :type => :controller do
|
||||
end
|
||||
|
||||
describe "POST create" do
|
||||
subject(:action){post :create, {:gremium => FactoryGirl.attributes_for(:gremium),:format=>:html}}
|
||||
subject(:action){post :create, {:gremium => FactoryBot.attributes_for(:gremium),:format=>:html}}
|
||||
|
||||
login_fet_user
|
||||
describe "with valid params" do
|
||||
|
||||
@@ -3,8 +3,8 @@ require 'spec_helper'
|
||||
|
||||
RSpec.describe NeuigkeitenController, :type => :controller do
|
||||
|
||||
let(:neuigkeit) {(FactoryGirl.create(:neuigkeit, :with_rubrik))}
|
||||
let(:intern_neuigkeit) {(FactoryGirl.create(:neuigkeit,:with_intern_rubrik))}
|
||||
let(:neuigkeit) {(FactoryBot.create(:neuigkeit, :with_rubrik))}
|
||||
let(:intern_neuigkeit) {(FactoryBot.create(:neuigkeit,:with_intern_rubrik))}
|
||||
|
||||
let(:valid_session) {{}}
|
||||
|
||||
@@ -34,7 +34,7 @@ RSpec.describe NeuigkeitenController, :type => :controller do
|
||||
end
|
||||
|
||||
it "denys access to unpublished news" do
|
||||
neuigkeit=FactoryGirl.create(:neuigkeit, :with_rubrik, :unpublished)
|
||||
neuigkeit=FactoryBot.create(:neuigkeit, :with_rubrik, :unpublished)
|
||||
get :show, {id: neuigkeit.id}, valid_session
|
||||
expect(response).to have_http_status(302)
|
||||
end
|
||||
@@ -133,7 +133,7 @@ RSpec.describe NeuigkeitenController, :type => :controller do
|
||||
end
|
||||
end
|
||||
describe "POST create" do
|
||||
let(:action) {post :create, {rubrik_id: neuigkeit.rubrik.id, neuigkeit: FactoryGirl.attributes_for(:neuigkeit)}}
|
||||
let(:action) {post :create, {rubrik_id: neuigkeit.rubrik.id, neuigkeit: FactoryBot.attributes_for(:neuigkeit)}}
|
||||
|
||||
it_behaves_like "it is restricted"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user