From e4ef5c156bbe2bc3660f00587b4963fd05454e83 Mon Sep 17 00:00:00 2001 From: rgarcia Date: Thu, 21 Jan 2016 18:02:08 +0100 Subject: [PATCH] fixes specs --- spec/controllers/users/registrations_controller_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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