diff --git a/app/models/data_analysis/local_authority_user.rb b/app/models/data_analysis/local_authority_user.rb index 72595ef2d..28a19035d 100644 --- a/app/models/data_analysis/local_authority_user.rb +++ b/app/models/data_analysis/local_authority_user.rb @@ -30,7 +30,7 @@ def authorities # @return [User::ActiveRecord_Relation] def public_beta_users - User.since_public_beta.with_local_authority + User.since_public_beta.with_local_authority.registration_complete end end end diff --git a/spec/models/data_analysis/local_authority_user_spec.rb b/spec/models/data_analysis/local_authority_user_spec.rb index 00ffcd090..a91658cbe 100644 --- a/spec/models/data_analysis/local_authority_user_spec.rb +++ b/spec/models/data_analysis/local_authority_user_spec.rb @@ -22,6 +22,10 @@ end before do + # Incomplete registration + create :user, :named, local_authority: 'LA3' + + # Registered user create :user, :registered, local_authority: 'LA1' create :user, :registered, local_authority: 'LA1' create :user, :registered, local_authority: 'LA3'