<commit_before>//
//  AvailabilitySpec.swift
//  Ello
//
//  Created by <NAME> on 3/31/15.
//  Copyright (c) 2015 Ello. All rights reserved.
//

import Ello
import Quick
import Nimble


class AvailabilitySpec: QuickSpec {
    override func spec() {
        it("converts from JSON") {
            let parsedAvailability = stubbedJSONData("availability", "availability")
            let availability = Availability.fromJSON(parsedAvailability) as! Availability

            expect(availability.isUsernameAvailable).to(beFalse())
            expect(availability.isEmailAvailable).to(beTrue())
            expect(availability.isInvitationCodeAvailable).to(beTrue())
            expect(availability.usernameSuggestions.count) == 3
            expect(availability.emailSuggestion) == "<EMAIL>"
        }
    }
}
<commit_msg>update to match JSON stubbed response<commit_after>//
//  AvailabilitySpec.swift
//  Ello
//
//  Created by <NAME> on 3/31/15.
//  Copyright (c) 2015 Ello. All rights reserved.
//

import Ello
import Quick
import Nimble


class AvailabilitySpec: QuickSpec {
    override func spec() {
        it("converts from JSON") {
            let parsedAvailability = stubbedJSONData("availability", "availability")
            let availability = Availability.fromJSON(parsedAvailability) as! Availability

            expect(availability.isUsernameAvailable).to(beTrue())
            expect(availability.isEmailAvailable).to(beTrue())
            expect(availability.isInvitationCodeAvailable).to(beTrue())
            expect(availability.usernameSuggestions.count) == 3
            expect(availability.emailSuggestion) == "<EMAIL>"
        }
    }
}

{'fraction_non_alphanumeric': 0.11091018685955395, 'fraction_numerical': 0.012055455093429777, 'mean_word_length': 2.933649289099526, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '2344053', 'n_tokens_mistral': 481, 'n_tokens_neox': 434, 'n_words': 97}