diff --git a/spec/controllers/users/registrations_controller_spec.rb b/spec/controllers/users/registrations_controller_spec.rb index 6f4c22488..ea73428f5 100644 --- a/spec/controllers/users/registrations_controller_spec.rb +++ b/spec/controllers/users/registrations_controller_spec.rb @@ -10,7 +10,7 @@ describe Users::RegistrationsController do context "when username is available" do it "should return true with no error message" do - post :check_username, username: "available username" + get :check_username, username: "available username" data = JSON.parse response.body, symbolize_names: true expect(data[:available]).to be true @@ -19,9 +19,9 @@ describe Users::RegistrationsController do end context "when username is not available" do - it "should return true with no error message" do + it "should return false with an error message" do user = create(:user) - post :check_username, username: user.username + get :check_username, username: user.username data = JSON.parse response.body, symbolize_names: true expect(data[:available]).to be false @@ -31,4 +31,4 @@ describe Users::RegistrationsController do end -end +end \ No newline at end of file