|
1 | 1 | require "rails_helper"
|
2 | 2 |
|
3 | 3 | describe "creating datasets" do
|
4 |
| - let(:land) { FactoryGirl.create(:organisation, name: 'land-registry', title: 'Land Registry') } |
5 |
| - let!(:user) { FactoryGirl.create(:user, primary_organisation: land) } |
6 |
| - let!(:dataset) { FactoryGirl.create(:dataset, organisation: land, creator: user) } |
7 |
| - let!(:topic) { FactoryGirl.create(:topic) } |
| 4 | + let(:land) { FactoryBot.create(:organisation, name: 'land-registry', title: 'Land Registry') } |
| 5 | + let!(:user) { FactoryBot.create(:user, primary_organisation: land) } |
| 6 | + let!(:dataset) { FactoryBot.create(:dataset, organisation: land, creator: user) } |
| 7 | + let!(:topic) { FactoryBot.create(:topic) } |
8 | 8 |
|
9 | 9 | context "when the user goes through entire flow" do
|
10 | 10 | before(:each) do
|
|
135 | 135 | end
|
136 | 136 |
|
137 | 137 | describe "starting a new draft with invalid inputs" do
|
138 |
| - let(:land) { FactoryGirl.create(:organisation, name: 'land-registry', title: 'Land Registry') } |
139 |
| - let!(:user) { FactoryGirl.create(:user, primary_organisation: land) } |
140 |
| - let!(:topic) { FactoryGirl.create(:topic) } |
| 138 | + let(:land) { FactoryBot.create(:organisation, name: 'land-registry', title: 'Land Registry') } |
| 139 | + let!(:user) { FactoryBot.create(:user, primary_organisation: land) } |
| 140 | + let!(:topic) { FactoryBot.create(:topic) } |
141 | 141 |
|
142 | 142 | before(:each) do
|
143 | 143 | url = "https://test.data.gov.uk/api/3/action/package_patch"
|
|
192 | 192 | end
|
193 | 193 |
|
194 | 194 | describe "valid options for topic, licence and area" do
|
195 |
| - let(:land_registry) { FactoryGirl.create(:organisation, name: 'land-registry', title: 'Land Registry') } |
196 |
| - let!(:user) { FactoryGirl.create(:user, primary_organisation: land_registry) } |
197 |
| - let!(:topic) { FactoryGirl.create(:topic) } |
| 195 | + let(:land_registry) { FactoryBot.create(:organisation, name: 'land-registry', title: 'Land Registry') } |
| 196 | + let!(:user) { FactoryBot.create(:user, primary_organisation: land_registry) } |
| 197 | + let!(:topic) { FactoryBot.create(:topic) } |
198 | 198 |
|
199 | 199 | before(:each) do
|
200 | 200 | url = "https://test.data.gov.uk/api/3/action/package_patch"
|
|
257 | 257 | end
|
258 | 258 |
|
259 | 259 | describe "dataset frequency options" do
|
260 |
| - let(:land) { FactoryGirl.create(:organisation, name: 'land-registry', title: 'Land Registry') } |
261 |
| - let!(:user) { FactoryGirl.create(:user, primary_organisation: land) } |
262 |
| - let!(:dataset) { FactoryGirl.create(:dataset, organisation: land) } |
| 260 | + let(:land) { FactoryBot.create(:organisation, name: 'land-registry', title: 'Land Registry') } |
| 261 | + let!(:user) { FactoryBot.create(:user, primary_organisation: land) } |
| 262 | + let!(:dataset) { FactoryBot.create(:dataset, organisation: land) } |
263 | 263 |
|
264 | 264 | before(:each) do
|
265 | 265 | url = "https://test.data.gov.uk/api/3/action/package_patch"
|
@@ -410,9 +410,9 @@ def pick_year(year_type)
|
410 | 410 | end
|
411 | 411 |
|
412 | 412 | describe "passing the frequency page" do
|
413 |
| - let(:land) { FactoryGirl.create(:organisation, name: 'land-registry', title: 'Land Registry') } |
414 |
| - let!(:user) { FactoryGirl.create(:user, primary_organisation: land) } |
415 |
| - let!(:dataset) { FactoryGirl.create(:dataset, organisation: land, frequency: nil) } |
| 413 | + let(:land) { FactoryBot.create(:organisation, name: 'land-registry', title: 'Land Registry') } |
| 414 | + let!(:user) { FactoryBot.create(:user, primary_organisation: land) } |
| 415 | + let!(:dataset) { FactoryBot.create(:dataset, organisation: land, frequency: nil) } |
416 | 416 |
|
417 | 417 | before(:each) do
|
418 | 418 | url = "https://test.data.gov.uk/api/3/action/package_patch"
|
|
0 commit comments