<commit_before>_ = require 'underscore'
benv = require 'benv'
jade = require 'jade'
path = require 'path'
fs = require 'graceful-fs'
CurrentUser = require '../../../models/current_user'
{ fabricate } = require 'antigravity'
$ = require 'cheerio'

render = (opts) ->
  filename = path.resolve __dirname, "../templates/index.jade"
  jade.compile(
    fs.readFileSync(filename),
    { filename: filename }
  )(_.extend require('./fixture/content.json'), { sd: {}, crop: -> }, opts)

describe 'About templates', ->

  it 'hides the sign up CTAs for logged out users', ->
    $(render user: new CurrentUser fabricate 'user')
      .find('#the-art-world-online').html().should.not.containEql 'Sign up to save'<commit_msg>Fix spec failure<commit_after>_ = require 'underscore'
benv = require 'benv'
jade = require 'jade'
path = require 'path'
fs = require 'graceful-fs'
CurrentUser = require '../../../models/current_user'
{ fabricate } = require 'antigravity'
$ = require 'cheerio'

render = (opts) ->
  filename = path.resolve __dirname, "../templates/index.jade"
  jade.compile(
    fs.readFileSync(filename),
    { filename: filename }
  )(_.extend require('./fixture/content.json'), { asset: (->), sd: {}, crop: -> }, opts)

describe 'About templates', ->

  it 'hides the sign up CTAs for logged out users', ->
    $(render user: new CurrentUser fabricate 'user')
      .find('#the-art-world-online').html().should.not.containEql 'Sign up to save'
{'fraction_non_alphanumeric': 0.1715076071922545, 'fraction_numerical': 0.0, 'mean_word_length': 3.7913907284768213, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 12, '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': '4603752', 'n_tokens_mistral': 470, 'n_tokens_neox': 465, 'n_words': 126}