@ -208,10 +208,11 @@ RSpec.describe "Schemes scheme Features" do
end
end
context " when creating a new scheme " do
context " when creating a new scheme " do
let! ( :organisation ) { FactoryBot . create ( :organisation , name : " FooBar " ) }
let ( :organisation_name ) { " FooBar " }
let ( :scheme ) { Scheme . first }
let ( :scheme ) { Scheme . first }
before do
before do
FactoryBot . create ( :organisation , name : organisation_name )
Scheme . destroy_all
Scheme . destroy_all
click_link " Schemes " , href : " /schemes "
click_link " Schemes " , href : " /schemes "
end
end
@ -222,8 +223,6 @@ RSpec.describe "Schemes scheme Features" do
end
end
context " when I press create a new scheme " do
context " when I press create a new scheme " do
let! ( :organisation ) { FactoryBot . create ( :organisation , name : " FooBar " ) }
before do
before do
click_link " Create a new supported housing scheme "
click_link " Create a new supported housing scheme "
end
end
@ -470,13 +469,12 @@ RSpec.describe "Schemes scheme Features" do
end
end
end
end
context " when I fill in scheme details indicating that supported services provided by a different organisation and I press save I see primary client group section " do
context " when I fill in scheme details indicating that supported services provided by a different organisation and I press save I see primary client group section " do
let ( :scheme ) { Scheme . first }
let ( :scheme ) { Scheme . first }
let! ( :another_organisation ) { FactoryBot . create ( :organisation , name : " Another Org " ) }
let! ( :another_organisation ) { FactoryBot . create ( :organisation , name : " Another Org " ) }
before do
before do
fill_in_and_save_scheme_details ( { " housing_stock_owners " = > " Another registered housing provider " } )
fill_in_and_save_scheme_details ( { " housing_stock_owners " = > " Another registered housing provider " } )
end
end
it " lets me fill in the managing organisation details " do
it " lets me fill in the managing organisation details " do