Browse Source

Update tests

pull/1999/head
Kat 3 years ago
parent
commit
83f2a8fe53
  1. 4
      spec/features/organisation_spec.rb
  2. 4
      spec/features/schemes_spec.rb
  3. 12
      spec/requests/organisation_relationships_controller_spec.rb

4
spec/features/organisation_spec.rb

@ -189,7 +189,7 @@ RSpec.describe "User Features" do
end
it "has correct page details" do
expect(page).to have_content("#{number_of_lettings_logs} total logs")
expect(page).to have_content("#{number_of_lettings_logs} matching logs")
organisation.lettings_logs.map(&:id).each do |lettings_log_id|
expect(page).to have_link lettings_log_id.to_s, href: "/lettings-logs/#{lettings_log_id}"
end
@ -237,7 +237,7 @@ RSpec.describe "User Features" do
end
it "can filter sales logs" do
expect(page).to have_content("#{number_of_sales_logs} total logs")
expect(page).to have_content("#{number_of_sales_logs} matching logs")
organisation.sales_logs.map(&:id).each do |sales_log_id|
expect(page).to have_link sales_log_id.to_s, href: "/sales-logs/#{sales_log_id}"
end

4
spec/features/schemes_spec.rb

@ -572,7 +572,7 @@ RSpec.describe "Schemes scheme Features" do
it "displays information about a single location" do
expect(page).to have_content "Locations"
expect(page).to have_content "#{scheme.locations.count} total location"
expect(page).to have_content "#{scheme.locations.count} matching location"
end
it "displays information about the first created location" do
@ -585,7 +585,7 @@ RSpec.describe "Schemes scheme Features" do
fill_in_and_save_second_location
click_button "Save and return to locations"
expect(page).to have_content "Locations"
expect(page).to have_content "#{scheme.locations.count} total location"
expect(page).to have_content "#{scheme.locations.count} matching location"
end
it "displays information about newly created location" do

12
spec/requests/organisation_relationships_controller_spec.rb

@ -47,7 +47,7 @@ RSpec.describe OrganisationRelationshipsController, type: :request do
end
it "shows the pagination count" do
expect(page).to have_content("1 total stock owners")
expect(page).to have_content("1 matching stock owners")
end
context "when adding a stock owner" do
@ -113,7 +113,7 @@ RSpec.describe OrganisationRelationshipsController, type: :request do
end
it "shows the pagination count" do
expect(page).to have_content("1 total agents")
expect(page).to have_content("1 matching agents")
end
end
@ -285,7 +285,7 @@ RSpec.describe OrganisationRelationshipsController, type: :request do
end
it "shows the pagination count" do
expect(page).to have_content("1 total stock owners")
expect(page).to have_content("1 matching stock owners")
end
end
@ -421,7 +421,7 @@ RSpec.describe OrganisationRelationshipsController, type: :request do
end
it "shows the pagination count" do
expect(page).to have_content("1 total agents")
expect(page).to have_content("1 matching agents")
end
end
@ -587,7 +587,7 @@ RSpec.describe OrganisationRelationshipsController, type: :request do
end
it "shows the pagination count" do
expect(page).to have_content("1 total stock owners")
expect(page).to have_content("1 matching stock owners")
end
context "when adding a stock owner" do
@ -637,7 +637,7 @@ RSpec.describe OrganisationRelationshipsController, type: :request do
end
it "shows the pagination count" do
expect(page).to have_content("1 total agents")
expect(page).to have_content("1 matching agents")
end
it "shows remove link(s)" do

Loading…
Cancel
Save