<commit_before>require 'rails_helper'

RSpec.describe "User API", type: :request do

  before(:all) do
    Timecop.freeze
    @user = create(:user)
  end

  describe "GET /api/user/:id" do
    it "returns http unauthorized" do
      get api_user_path(@user)
      expect(response).to have_http_status(:unauthorized)
    end
    it "returns current user" do
      get api_user_path(@user), params: nil, headers: auth_headers(@user)
      expect(response.body).to look_like_json
      expect(body_as_json).to equal_model_hash(@user)
    end
  end
end<commit_msg>refactor spec dir strcutures to use name space<commit_after>require 'rails_helper'

RSpec.describe "Api::Users", type: :request do

  before(:all) do
    Timecop.freeze
    @user = create(:user)
  end

  describe "GET /api/user/:id" do
    it "returns http unauthorized" do
      get api_user_path(@user)
      expect(response).to have_http_status(:unauthorized)
    end
    it "returns current user" do
      get api_user_path(@user), params: nil, headers: auth_headers(@user)
      expect(response.body).to look_like_json
      expect(body_as_json).to equal_model_hash(@user)
    end
  end
end
{'fraction_non_alphanumeric': 0.1038961038961039, 'fraction_numerical': 0.0, 'mean_word_length': 3.6801619433198383, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6419435', 'n_tokens_mistral': 382, 'n_tokens_neox': 373, 'n_words': 97}