]> gitweb.mndrdr.org Git - arelpe.git/commitdiff
Much better test fixtures
authorAidan Cornelius-Bell <[email protected]>
Tue, 31 Dec 2024 21:40:17 +0000 (08:10 +1030)
committerAidan Cornelius-Bell <[email protected]>
Tue, 31 Dec 2024 21:40:17 +0000 (08:10 +1030)
test/fixtures/api_keys.yml
test/fixtures/pages.yml
test/fixtures/posts.yml
test/fixtures/users.yml

index 2902bee76619f7e0f85e77213262815074a3ce3e..9405e52574e11235b527ee393dd8b723ee77950b 100644 (file)
@@ -1,7 +1,7 @@
 # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
 
-one:
+admin_key:
   key: <%= SecureRandom.hex(20) %>
 
-two:
+test_key:
   key: <%= SecureRandom.hex(20) %>
index 4e8457eae4f679dbb99009683d73c8e40a214e0a..389e804d2eb035a6f4567d02d1fc7a091183d0c2 100644 (file)
@@ -1,13 +1,17 @@
 # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
 
-one:
-  title: Page One
-  slug: page-one-<%= SecureRandom.hex(4) %>
-  content: MyText
+about:
+  title: About mind reader
+  slug: about-<%= SecureRandom.hex(4) %>
+  content: |
+    Welcome to mind reader. This is a space for critical analysis of technology, capitalism, and social change.
+    The goal is to understand how these forces shape our world and imagine better futures.
   visibility: 1
 
-two:
-  title: Page Two
-  slug: page-two-<%= SecureRandom.hex(4) %>
-  content: MyText
+privacy:
+  title: Privacy Policy
+  slug: privacy-<%= SecureRandom.hex(4) %>
+  content: |
+    mind reader respects your privacy. We only collect essential data needed to provide our services.
+    Your data is never sold or shared with third parties.
   visibility: 1
index f2901fed8d5780ea9366081cafedc2b8634c90a7..d78e10103f16cbc6f23dc7ea4272bc96d890be7d 100644 (file)
@@ -1,21 +1,51 @@
 # Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
+#
+tech_dispatch:
+  post_type: dispatch
+  title: The Hidden Costs of AI Development
+  slug: hidden-costs-ai-<%= SecureRandom.hex(4) %>
+  published_at: <%= Time.current - 2.days %>
+  excerpt: Examining the environmental and social impacts of training large language models
+  tags: AI, technology, climate
+  content: |
+    The rise of large language models has transformed the tech landscape, but at what cost?
+    This analysis explores the hidden environmental and social impacts of AI development.
+
+    We need to consider:
+    - Energy consumption of training
+    - Data center infrastructure
+    - Labor conditions in the AI supply chain
+  url:
 
-one:
+social_dispatch:
   post_type: dispatch
-  title: Post One
-  slug: post-one-<%= SecureRandom.hex(4) %>
-  published_at: 2024-09-14 17:08:02
-  excerpt: MyText
-  tags: MyText
-  content: MyText
-  url: https://example.com/1
+  title: Reimagining Social Media
+  slug: reimagining-social-<%= SecureRandom.hex(4) %>
+  published_at: <%= Time.current - 5.days %>
+  excerpt: A critical look at alternative social media platforms
+  tags: social media, technology, community
+  content: |
+    What would social media look like if it was designed for human flourishing instead of profit?
+
+    This piece explores existing alternatives and imagines new possibilities.
+  url:
+
+tech_bookmark:
+  post_type: bookmark
+  title: The Environmental Impact of ChatGPT
+  slug: chatgpt-environment-<%= SecureRandom.hex(4) %>
+  published_at: <%= Time.current - 1.day %>
+  excerpt: MIT Technology Review examines ChatGPT's carbon footprint
+  tags: AI, climate, technology
+  content: Fascinating analysis of the environmental costs of running large language models
+  url: https://example.com/chatgpt-impact
 
-two:
+social_bookmark:
   post_type: bookmark
-  title: Post Two
-  slug: post-two-<%= SecureRandom.hex(4) %>
-  published_at: 2024-09-14 17:08:02
-  excerpt: MyText
-  tags: MyText
-  content: MyText
-  url: https://example.com/2
+  title: Platform Cooperativism Now
+  slug: platform-coop-<%= SecureRandom.hex(4) %>
+  published_at: <%= Time.current - 3.days %>
+  excerpt: How worker-owned platforms are challenging the gig economy
+  tags: cooperatives, technology, labor
+  content: Great overview of the growing platform cooperativism movement
+  url: https://example.com/platform-coops
index d7a33292411ca8e46588a21df7bb4d4f77c42c0d..d2d415b04a038e457659bab57577142a5d3b26eb 100644 (file)
@@ -4,8 +4,35 @@
 # model remove the "{}" from the fixture names and add the columns immediately
 # below each fixture, per the syntax in the comments below
 #
-one: {}
-# column: value
-#
-two: {}
-# column: value
+admin:
+  email: [email protected]
+  first_name: Admin
+  last_name: User
+  admin: true
+  encrypted_password: <%= BCrypt::Password.create('password123') %>
+  confirmed_at: <%= Time.current - 1.month %>
+  support_type: ongoing
+  subscription_status: active
+  buttondown_status: premium
+
+regular_user:
+  email: [email protected]
+  first_name: Regular
+  last_name: User
+  admin: false
+  encrypted_password: <%= BCrypt::Password.create('password123') %>
+  confirmed_at: <%= Time.current - 2.weeks %>
+  support_type: non_financial
+  subscription_status:
+  buttondown_status: unpaid
+
+paid_user:
+  email: [email protected]
+  first_name: Paid
+  last_name: User
+  admin: false
+  encrypted_password: <%= BCrypt::Password.create('password123') %>
+  confirmed_at: <%= Time.current - 1.week %>
+  support_type: one_time
+  subscription_status: one_time
+  buttondown_status: premium